我有一个带示例的字符串
• How are you. • I am fine. • ThirdLine.
现在我想检测所有•出现并存储在数组中。该数组将包含三个条目
•How are you
•I am fine
•ThirdLine
如何在java
中完成答案 0 :(得分:0)
您可以使用Split()方法和所需的分隔符
String[] splitted= line.split("\\•"); //line is your whole string
答案 1 :(得分:0)
str = "• How are you. • I am fine. • ThirdLine.";
String[] list = str.split("\\•");