Java字符串首字母大写-高效方法,巧用ASCII编码进行转换 public static String toUpperFristChar(String string) { char[] charArray = string.toCharArray(); charArray[0] -= 32; return String.valueOf(charArray); }
public static String toUpperFristChar(String string) { char[] charArray = string.toCharArray(); charArray[0] -= 32; return String.valueOf(charArray); }