java - Get string from ("\n") new line operator -
java - Get string from ("\n") new line operator -
i have arraylist containing string abc"\n"1234,cde"\n"567 fgh"\n"890. want string found new line. array want 1234,567 , 890. here doing. says "incompatible types" have show dialog containing these contacts.and if user click on contacts opens dialer activity.
for(string contact: manycontacts){ string contacts=contact.split("\\r?\\n"); }
split
returns string[]
not string
for(string contact: manycontacts){ string[] contacts=contact.split("\\r?\\n"); }
if need 1 string have iterate on array , concatinate strings. or utilize commons-utils
apache bring together it.
java
Comments
Post a Comment