Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. /**
  2. * Formats a String so that the first letter is uppercase
  3. *
  4. * @param input String to be formatted
  5. */
  6. public static String toTitleCase(String input) {
  7. if (StringUtil.isEmpty(input)) {
  8. return input;
  9. }
  10. return input.substring(0, 1).toUpperCase() + input.substring(1).toLowerCase();
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement