📜  如何在 java android 中拆分字符串 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:17.293000             🧑  作者: Mango

代码示例2
String currentString = "Custom Section";
String[] splitarray = currentString.split(" ");
separated[0]; // this will contain "Custom"
separated[1]; // this will contain "Custom"

//assign to string variable
 for (int i = 2; i < array.length; i++) {
   secondName = secondName + " " + array[i];
 }