aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-05-31 12:10:32 +0200
committerGitHub <noreply@github.com>2023-05-31 12:10:32 +0200
commit9a5b9c588fdafd0d22fb5fa6dfa683194450da67 (patch)
tree86f2a9e0f13781017515c3e2a6d03d7d9201a708 /src/libexpr/primops.cc
parent38491443038c1efb7c42e3a85b9b1656d6a04cbf (diff)
parent9afd525e1847650589a376a5d3185241e4936b5d (diff)
Merge pull request #8421 from fricklerhandwerk/doc-replaceStrings
update documentation according to release notes
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 87515f384..42efca4e7 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -3957,7 +3957,11 @@ static RegisterPrimOp primop_replaceStrings({
.args = {"from", "to", "s"},
.doc = R"(
Given string *s*, replace every occurrence of the strings in *from*
- with the corresponding string in *to*. For example,
+ with the corresponding string in *to*.
+
+ The argument *to* is lazy, that is, it is only evaluated when its corresponding pattern in *from* is matched in the string *s*
+
+ Example:
```nix
builtins.replaceStrings ["oo" "a"] ["a" "i"] "foobar"