Is there any efficiency way to separate a string into two when detecting the first line break in the String
for example, the String like this:
String str = "line 1\n"+
"line 2\n"+
"line 3\n";
so what i want to do just separate "line 1" from the string, and the rest as another string, so finally the result as below:
string1 = "line 1";
string2 = "line 2\n"+
"line 3\n";