Wednesday, 15 June 2016

String Utilities

How to capitalize the first character of each word in a string


If you have a String like : today is a good day, then use the WordUtils.capitalize(str) from apache commons-lang.

If you need tODay is GOOd DaY to to become Today Is Good Day, then use capitalizeFully(str) instead.

No comments:

Post a Comment

Volatile keyword, Synchronized keyword and Lock interface

Volatile Marking a member variable as volatile, makes sure, when ever the member variable is accessed, its value is always read from the...