Java String Capitalize First capitaliseFirstLetter( final String originalLanguageName)

Here you can find the source of capitaliseFirstLetter( final String originalLanguageName)

Description

Capitalises the first letter, hoping this works for all Locales.

License

Open Source License

Parameter

Parameter Description
originalLanguageName the original language name

Return

the string

Declaration

public static String capitaliseFirstLetter(
        final String originalLanguageName) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from  w ww.  j a  va2  s .c  om*/
     * Capitalises the first letter, hoping this works for all Locales. To be revisited otherwise
     * 
     * @param originalLanguageName the original language name
     * @return the string
     */
    public static String capitaliseFirstLetter(
            final String originalLanguageName) {
        final char codePointAt = originalLanguageName.charAt(0);
        final char firstLetterTitle = Character.toTitleCase(codePointAt);
        return firstLetterTitle + originalLanguageName.substring(1);
    }
}

Related

  1. capitaliseFirst(String string)
  2. capitaliseFirstLetter(String s)
  3. capitaliseFirstLetter(String str)
  4. capitaliseFirstLetter(String str)
  5. capitaliseFirstLetter(String text)