Merge pull request #8421 from fricklerhandwerk/doc-replaceStrings
update documentation according to release notes
This commit is contained in:
commit
9a5b9c588f
2 changed files with 6 additions and 2 deletions
|
@ -4,4 +4,4 @@
|
||||||
The number of parallel downloads (also known as substitutions) has been separated from the [`--max-jobs` setting](../command-ref/conf-file.md#conf-max-jobs).
|
The number of parallel downloads (also known as substitutions) has been separated from the [`--max-jobs` setting](../command-ref/conf-file.md#conf-max-jobs).
|
||||||
The new setting is called [`max-substitution-jobs`](../command-ref/conf-file.md#conf-max-substitution-jobs).
|
The new setting is called [`max-substitution-jobs`](../command-ref/conf-file.md#conf-max-substitution-jobs).
|
||||||
The number of parallel downloads is now set to 16 by default (previously, the default was 1 due to the coupling to build jobs).
|
The number of parallel downloads is now set to 16 by default (previously, the default was 1 due to the coupling to build jobs).
|
||||||
- The function `builtins.replaceStrings` is now lazy in the value of its second argument `to`, that is a replacee in `to` is only evaluated when its corresponding pattern in `from` is matched in the string `s`.
|
- The function [`builtins.replaceStrings`](@docroot@/language/builtins.md#builtins-replaceStrings) is now lazy in the value of its second argument `to`. That is, `to` is only evaluated when its corresponding pattern in `from` is matched in the string `s`.
|
||||||
|
|
|
@ -3957,7 +3957,11 @@ static RegisterPrimOp primop_replaceStrings({
|
||||||
.args = {"from", "to", "s"},
|
.args = {"from", "to", "s"},
|
||||||
.doc = R"(
|
.doc = R"(
|
||||||
Given string *s*, replace every occurrence of the strings in *from*
|
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
|
```nix
|
||||||
builtins.replaceStrings ["oo" "a"] ["a" "i"] "foobar"
|
builtins.replaceStrings ["oo" "a"] ["a" "i"] "foobar"
|
||||||
|
|
Loading…
Reference in a new issue