public class StringUtil extends Object
| Constructor and Description |
|---|
StringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
startsWithLetter(String word)
用于判断单词的第一个字符是否为字母
|
static String |
toCamelCase(String source)
将字符串转换为驼峰格式,首字母小写
|
static String |
toCamelCase(String source,
boolean firstCharacterUppercase)
将字符串转换为驼峰格式
|
static String |
toLowerCaseFirstOne(String source)
将字符串的第一位转为小写
|
static String |
toPascalCase(String source)
将字符串转换为驼峰格式,首字母大写
|
static String |
toUpperCaseFirstOne(String source)
将字符串的第一位转为大写
|
public static boolean startsWithLetter(String word)
word - 单词public static String toCamelCase(String source, boolean firstCharacterUppercase)
source - 原始字符串firstCharacterUppercase - 首字母是否转换为大写public static String toCamelCase(String source)
source - 原始字符串public static String toPascalCase(String source)
source - 原始字符串public static String toLowerCaseFirstOne(String source)
source - 需要转换的字符串Copyright © 2018. All rights reserved.