klyn.String.lines
method

    public lines() as ArrayList<String>:

Description

Splits this string into lines without keeping line terminators.

Recognized line endings are LF (`\n`), CRLF (`\r\n`) and CR (`\r`). A trailing line terminator does not create an extra empty line, matching the usual text-line semantics.

Returns

The lines contained in this string.

Example

    lines = "first\nsecond".lines()
    assert lines == ["first", "second"]