Get each line in a string. Works with LF and CRLF line endings.
Time complexity: O(n)
Space complexity: O(n)
String to get the lines of
An array of lines
String
lines('a\nb\r\nc'); // ['a', 'b', 'c'] Copy
lines('a\nb\r\nc'); // ['a', 'b', 'c']
Get each line in a string. Works with LF and CRLF line endings.
Time complexity: O(n)
Space complexity: O(n)