Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Formats a String so that the first letter is uppercase
- *
- * @param input String to be formatted
- */
- public static String toTitleCase(String input) {
- if (StringUtil.isEmpty(input)) {
- return input;
- }
- return input.substring(0, 1).toUpperCase() + input.substring(1).toLowerCase();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement