Skip to content

lines

lines(s): readonly string[]

Defined in: Utils/Str.ts:98

Splits a string into lines, normalising \r\n and \r line endings.

string

readonly string[]

Str.lines("one\ntwo\nthree"); // ["one", "two", "three"]
Str.lines("a\r\nb");         // ["a", "b"]