Loading... (original) (raw)
String::lines instance method that returns a Stream with elements composed of substrings from the original string delimited by any recognized new line character sequence.
Note: String::lines() behaviour mimics BufferedReader::lines() as it treats new line character sequences as line terminators.
Unlike String::split, String::lines provides better performance by supplying elements lazily and by fast search of new line character sequences.