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?
Most common use of StringUtils is in web projects (when you want to check for blank or null strings, checking if a string is number, splitting strings with some token). StringUtils helps to get rid of those nasty NumberFormat and Null exceptions. But StringUtils can be used anywhere String is used.
isEmpty() is a static method of the StringUtils class that is used to check if a given string is empty or not. If a string satisfies any of the criteria below, then the string is considered to be empty. The length of the string is zero. The string points to a null reference.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With