Splits a string into an array of lines. This function handles different line endings by splitting on newline characters.
The string to split into lines
An array of string lines
of('hello\nworld') // ['hello', 'world']of('one line') // ['one line'] Copy
of('hello\nworld') // ['hello', 'world']of('one line') // ['one line']
Splits a string into an array of lines. This function handles different line endings by splitting on newline characters.