首字母大写

来源:互联网 发布:山东胜通预算软件 编辑:程序博客网 时间:2024/04/28 10:57

  public static String UpperName(String name) {
          byte[] items = name.getBytes(); 
          items[0] = (byte) ((char) items[0] - 'a' + 'A'); 
          return new String(items);
      }
0 0
原创粉丝点击