mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
lib/strings.concatLines: call concatStringsSep directly v2 (#514515)
This commit is contained in:
commit
420a86a788
1 changed files with 1 additions and 2 deletions
|
|
@ -337,7 +337,6 @@ rec {
|
|||
|
||||
/**
|
||||
Concatenate a list of strings, adding a newline at the end of each one.
|
||||
Defined as `concatMapStrings (s: s + "\n")`.
|
||||
|
||||
# Inputs
|
||||
|
||||
|
|
@ -361,7 +360,7 @@ rec {
|
|||
|
||||
:::
|
||||
*/
|
||||
concatLines = concatMapStrings (s: s + "\n");
|
||||
concatLines = lines: optionalString (lines != [ ]) (concatStringsSep "\n" lines + "\n");
|
||||
|
||||
/**
|
||||
Given string `s`, replace every occurrence of the string `from` with the string `to`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue