Package cn.xuanyuanli.core.util
Class CamelCase
java.lang.Object
cn.xuanyuanli.core.util.CamelCase
驼峰命名法转换工具
CamelCaseUtils.toCamelCase("orderId") == "orderId"
CamelCaseUtils.toCamelCase("hello_world") == "helloWorld"
CamelCaseUtils.toCapitalizeCamelCase("hello_world") == "HelloWorld"
CamelCaseUtils.toUnderScoreCase("helloWorld") = "hello_world"
- Author:
- John Li Email:jujubeframework@163.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ConcurrentMap<String, String> 字段转换的缓存private static final char分隔符 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringtoCamelCase(String input) 下划线写法转换为驼峰写法static StringtoCapitalizeCamelCase(String input) 下划线写法转换为驼峰写法,并首字母大写static StringtoSpecilCamelCase(String input) 特殊的转换:前两个字母不能大写static StringtoUnderlineName(String input) 遇大写,则转换为下划线形式+小写
-
Field Details
-
CACHE
字段转换的缓存 -
SEPARATOR
private static final char SEPARATOR分隔符- See Also:
-
-
Constructor Details
-
CamelCase
private CamelCase()驼峰式大小写
-
-
Method Details