Skip to content

Instantly share code, notes, and snippets.

@L3au
Created March 17, 2012 16:16
Show Gist options
  • Save L3au/2061612 to your computer and use it in GitHub Desktop.
Save L3au/2061612 to your computer and use it in GitHub Desktop.
使用String中的split拆分字符串,先输出大写字符在输出小写字符
public class CapitalLowerTrial{
public static void main(String[] args) {
String s = "jiURbFpLOeWBDpoHyJM";
String [] ss1 = s.split("\\p{Lower}");
String [] ss2 = s.split("\\p{Upper}");
for (String str : ss1) {
System.out.print(str);
}
for (String str : ss2) {
System.out.print(str);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment