Denys
Denys

Reputation: 133

Inverse function to StringUtils.capitalize()

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

Answers (1)

M A
M A

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

Related Questions