Reputation: 133
There is convenient method StringUtils.capitalize()
in apache-commons-lang
library. But I can not find pairwise inverse method for it, which will make first letter in word in lowercase. Does such method exists?
Upvotes: 6
Views: 3337
Reputation: 72864
You're looking for StringUtils.uncapitalize
:
Uncapitalizes a String changing the first letter to title case as per
Character.toLowerCase(char)
. No other letters are changed.
Upvotes: 10