Java String Capitalize First capitalizeFirst(String attribute)

Here you can find the source of capitalizeFirst(String attribute)

Description

capitalize First

License

Apache License

Parameter

Parameter Description
attribute some string

Return

the string with the character at position 0 capitalized

Declaration

public static String capitalizeFirst(String attribute) 

Method Source Code

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

public class Main {
    /**//from  w  w w. j  a  va2 s .  c  o m
     * 
     * @param attribute some string
     * @return the string with the character at position 0 capitalized
     */
    public static String capitalizeFirst(String attribute) {
        return Character.toUpperCase(attribute.charAt(0))
                + attribute.substring(1);
    }
}

Related

  1. capitaliseFirstLetter(String str)
  2. capitaliseFirstLetter(String str)
  3. capitaliseFirstLetter(String text)
  4. capitalizedFirst(String str)
  5. capitalizedLetter(String str, boolean onlyFirst)
  6. capitalizeFirst(String input)
  7. capitalizeFirst(String name)
  8. capitalizeFirst(String rawStr)
  9. capitalizeFirst(String s)