query
On this page

concatLines

lib.strings.concatLines

Docs pulled from | This Revision | about 1 hour ago


Nixpkgs manual

Concatenate a list of strings, adding a newline at the end of each one.

Inputs

list
List of strings. Any element that is not a string will be implicitly converted to a string.

Type

concatLines :: [String] -> String

Examples

lib.strings.concatLines usage example

concatLines [ "foo" "bar" ]
=> "foo\nbar\n"

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

concatLines = lines: optionalString (lines != [ ]) (concatStringsSep "\n" lines + "\n");