//upperCase--全部转大写
StringUtils.upperCase(null);
StringUtils.upperCase("china");
StringUtils.upperCase("china", Locale.ENGLISH);
System.out.println("---------------------------------");
//lowerCase--全部转小写
StringUtils.lowerCase(null);
StringUtils.lowerCase("CHINA");
StringUtils.lowerCase("CHINA",Locale.ENGLISH);
System.out.println("---------------------------------");
//swapCase--大小写互换
StringUtils.swapCase(null);
StringUtils.swapCase("china");
//判断字符串是否全部是大写或者小写(空或空白符均为false)
StringUtils.isAllUpperCase(null);
StringUtils.isAllUpperCase("");
StringUtils.isAllUpperCase(" ");
StringUtils.isAllUpperCase("CHINA");
StringUtils.isAllUpperCase(null);
StringUtils.isAllUpperCase("");
StringUtils.isAllUpperCase(" ");
StringUtils.isAllUpperCase("china");
//指定位置截取,正数为从左往右,负数为从右往左
System.out.println(StringUtils.reverse("1-9"));
System.out.println(StringUtils.substring("asdf", -1));
System.out.println("---------------------------------");
//指定起始位置和结束位置,正数为从左往右,负数为从右往左,(但不包含结束位置)
System.out.println(StringUtils.substring("abcd", 0, 3));
System.out.println(StringUtils.substring("abcd", 0, -2));
System.out.println("---------------------------------");
// 从分隔符第一次出现的位置向后或向前截取
System.out.println(StringUtils.substringAfter("abc,de,fd", ","));
System.out.println(StringUtils.substringBefore("abc,de,fd", ","));
System.out.println("---------------------------------");
//从分隔符最后一次出现的位置向后或向前截取
System.out.println(StringUtils.substringAfterLast("asd,fd,ghg", ","));
System.out.println(StringUtils.substringBeforeLast("adf,ag,gh", ","));