例如 ‘ world : 世界’ 按中间的 ‘|’来 分割,得到 ‘world’ 和‘世界’
public class Test {
public static void main(String args[]) {
String ISBN = "world|世界";
int j = 1;
String Left="";
String Right="";
int k= ISBN.length();
for (int i = 0; i < ISBN.length(); i++) {
if (ISBN.substring(i, i + 1).equals("|")) {
Left=ISBN.substring(0,i).trim();
Right=ISBN.substring(i+1,k).trim();
}
else {
}
System.out.println(Left);
System.out.println(Right);
}}}