java utils 慢慢整理
- 摘要:/***字符串首字母大写*@paramentryStr*@return*@throwsException*//*privatestaticStringchangeFirstStrUpcase(StringentryStr)throwsException{byte[]items=entryStr.getBytes();items[0]=(byte)((char)items[0]-'a'+'A');returnnewString(items);}
- 标签:Java
/**
* 字符串首字母大写
* @param entryStr
* @return
* @throws Exception
*//*
private static String changeFirstStrUpcase(String entryStr) throws Exception {
byte[] items = entryStr.getBytes();
items[0] = (byte) ((char) items[0] - 'a' + 'A');
return new String(items);
}