capitalize(java.lang.String str)
StringUtil.capitalize("user") = User
StringUtil.capitalize("URL") = URL
uncapitalize(java.lang.String str)
StringUtil.capitalize("User") = user
count(java.lang.String source, java.lang.String sub)
StringUtil.count("aaa","a") = 3
StringUtil.count("aAa","a") = 2
countIgnoreCase(java.lang.String source, java.lang.String sub)
StringUtil.count("aAa","a") = 3
StringUtil.count("aAa","a") = 3
crop(java.lang.String string)
StringUtil.crop("") = null
- 获得字符串string中left和right之间的字符
cutBetween(java.lang.String string, java.lang.String left, java.lang.String right)
StringUtil.cutBetween("aaabbbccc","aaa","ccc") = bbb
cutFromIndexOf(java.lang.String string, char c)
cutFromIndexOf(java.lang.String string, java.lang.String substring)
cutPrefix(java.lang.String string, java.lang.String prefix)
StringUtil.cutPrefix("sysUser","sys") = User
cutSuffix(java.lang.String string, java.lang.String suffix)
StringUtil.cutPrefix("sysUser","sys") = User
cutSurrounding(java.lang.String string, java.lang.String prefix, java.lang.String suffix)
cutSurrounding(java.lang.String string, java.lang.String fix)
toCamelCase(java.lang.String input,boolean firstCharUppercase,char separator)
StringUtil.toCamelCase("sys_User", false, '_') = sysUser
StringUtil.toCamelCase("sys_User", true, '_') = SysUser