Java String Title Case toTitleCase(String text)

Here you can find the source of toTitleCase(String text)

Description

This converts a string to TitleCase (first character uppercase, the rest left alone).

License

Apache License

Declaration

public static String toTitleCase(String text) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/* w  ww .j  ava  2s .  co m*/
     * This converts a string to TitleCase (first character uppercase, the rest
     * left alone).
     */
    public static String toTitleCase(String text) {
        return text.substring(0, 1).toUpperCase() + text.substring(1);
    }
}

Related

  1. toTitleCase(String sIn)
  2. toTitleCase(String str)
  3. toTitleCase(String str)
  4. toTitleCase(String string)
  5. toTitleCase(String string)
  6. toTitleCase(String title)
  7. toTitleCase2(String string, String separators)
  8. toTitleCaseIdentifier(String formStr)