Java String Title Case toTitleCase(final String text)

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

Description

to Title Case

License

Open Source License

Declaration

public static String toTitleCase(final String text) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String toTitleCase(final String text) {
        if (text == null) {
            return null;
        }/*from www.jav a 2s  .  c om*/
        if ("".equals(text)) {
            return "";
        }
        return text.substring(0, 1).toUpperCase() + text.substring(1);
    }
}

Related

  1. toTitleCase(final int chr)
  2. toTitleCase(final String input)
  3. toTitleCase(final String inStr)
  4. toTitleCase(final String inStr, final boolean putRestInLC)
  5. toTitleCase(final String s)
  6. toTitleCase(String givenString)
  7. toTitleCase(String input)
  8. toTitleCase(String input, boolean eachWord)
  9. toTitleCase(String inputStr)