mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
Merge pull request #205557 from ncfavier/concatLines
lib/strings: add `concatLines`
This commit is contained in:
commit
50e4dbf35b
3 changed files with 17 additions and 1 deletions
|
@ -128,6 +128,17 @@ rec {
|
|||
# List of input strings
|
||||
list: concatStringsSep sep (lib.imap1 f list);
|
||||
|
||||
/* Concatenate a list of strings, adding a newline at the end of each one.
|
||||
Defined as `concatMapStrings (s: s + "\n")`.
|
||||
|
||||
Type: concatLines :: [string] -> string
|
||||
|
||||
Example:
|
||||
concatLines [ "foo" "bar" ]
|
||||
=> "foo\nbar\n"
|
||||
*/
|
||||
concatLines = concatMapStrings (s: s + "\n");
|
||||
|
||||
/* Construct a Unix-style, colon-separated search path consisting of
|
||||
the given `subDir` appended to each of the given paths.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue