I have a string with example
• How are you. • I am fine. • ThirdLine.
Now I want to detect all • occurrences and store in an array. The array would contain three entries
•How are you
•I am fine
•ThirdLine
How can this be done in java
I have a string with example
• How are you. • I am fine. • ThirdLine.
Now I want to detect all • occurrences and store in an array. The array would contain three entries
•How are you
•I am fine
•ThirdLine
How can this be done in java
You can use Split() method with desired delimiter
String[] splitted= line.split("\\•"); //line is your whole string
str = "• How are you. • I am fine. • ThirdLine.";
String[] list = str.split("\\•");