@cocoaphony And for a case where you really want to split purely on the \n:

"a\r\nb".unicodeScalars.split(separator: "\n").map { Substring($0) }