StringUtils.capitalize() 的反函数
Inverse function to StringUtils.capitalize()
apache-commons-lang
库中有方便的方法 StringUtils.capitalize()
。但是我找不到它的成对逆方法,它将单词中的第一个字母变成小写。有这种方法吗?
您正在寻找 StringUtils.uncapitalize
:
Uncapitalizes a String changing the first letter to title case as per Character.toLowerCase(char)
. No other letters are changed.
apache-commons-lang
库中有方便的方法 StringUtils.capitalize()
。但是我找不到它的成对逆方法,它将单词中的第一个字母变成小写。有这种方法吗?
您正在寻找 StringUtils.uncapitalize
:
Uncapitalizes a String changing the first letter to title case as per
Character.toLowerCase(char)
. No other letters are changed.