We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5fc8db commit bb1f9b0Copy full SHA for bb1f9b0
src/Nix/Builtins.hs
@@ -923,6 +923,15 @@ genericClosure = fromValue @(AttrSet (NValue t f m)) >=> \s ->
923
WValue j : _ -> checkComparable k' j
924
fmap (t :) <$> go op (ts <> ys) (S.insert (WValue k') ks)
925
926
+-- | Takes:
927
+-- 1. List of expressions to replace.
928
+-- (finds the occurances of them)
929
+-- 2. List of expressions to replace corresponding occurance. (arg 1 & 2 lists matched by index)
930
+-- 3. Expression to process
931
+-- -> returns the expression with requested replacements.
932
+--
933
+-- Example:
934
+-- builtins.replaceStrings ["ll" "e"] [" " "i"] "Hello world" == "Hi o world".
935
replaceStrings
936
:: MonadNix e t f m
937
=> NValue t f m
0 commit comments