类 CaseUtils
java.lang.Object
cool.scx.common.util.CaseUtils
命名方法转换工具类
提供 驼峰 匈牙利 短横线 及 蛇形命名法的互相转换
提供 驼峰 匈牙利 短横线 及 蛇形命名法的互相转换
- 版本:
- 0.0.1
- 作者:
- scx567888
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Stringconvert(String str, CaseUtils.CaseType to, CaseUtils.CaseType from) 推断原来的命名是啥 并返回切割后的源字符串static String转换为驼峰命名法 getNameByAgestatic StringtoCamel(String str, CaseUtils.CaseType caseType) 转换为驼峰命名法 getNameByAgestatic String转换为短横线命名法 get-name-by-agestatic StringtoKebab(String str, CaseUtils.CaseType caseType) 转换为短横线命名法 get-name-by-agestatic String转换为匈牙利命名法 GetNameByAgestatic StringtoPascal(String str, CaseUtils.CaseType caseType) 转换为匈牙利命名法 GetNameByAgestatic String转换为蛇形命名法 get_name_by_agestatic StringtoSnake(String str, CaseUtils.CaseType caseType) 转换为蛇形命名法 get_name_by_age
-
构造器详细资料
-
CaseUtils
public CaseUtils()
-
-
方法详细资料
-
toCamel
转换为驼峰命名法 getNameByAge- 参数:
str- s- 返回:
- r
-
toPascal
转换为匈牙利命名法 GetNameByAge- 参数:
str- s- 返回:
- r
-
toKebab
转换为短横线命名法 get-name-by-age- 参数:
str- s- 返回:
- r
-
toSnake
转换为蛇形命名法 get_name_by_age- 参数:
str- s- 返回:
- r
-
toCamel
转换为驼峰命名法 getNameByAge- 参数:
str- scaseType- aCaseUtils.CaseTypeobject- 返回:
- r
-
toPascal
转换为匈牙利命名法 GetNameByAge- 参数:
str- scaseType- aCaseUtils.CaseTypeobject- 返回:
- r
-
toKebab
转换为短横线命名法 get-name-by-age- 参数:
str- scaseType- aCaseUtils.CaseTypeobject- 返回:
- r
-
toSnake
转换为蛇形命名法 get_name_by_age- 参数:
str- scaseType- aCaseUtils.CaseTypeobject- 返回:
- r
-
convert
推断原来的命名是啥 并返回切割后的源字符串- 参数:
str- 源字符串to- aCaseUtils.CaseTypeobjectfrom- aCaseUtils.CaseTypeobject- 返回:
- 分割后的数组
-