This should cover you:
String lines[] = string.split("\\r?\\n");
There’s only really two newlines (UNIX and Windows) that you need to worry about.
This should cover you:
String lines[] = string.split("\\r?\\n");
There’s only really two newlines (UNIX and Windows) that you need to worry about.