Java String Capitalize First capitalizeFirst(String name)

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

Description

capitalize First

License

Apache License

Declaration

public static String capitalizeFirst(String name) 

Method Source Code

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

public class Main {
    public static String capitalizeFirst(String name) {
        char first = name.charAt(0);
        first = Character.toUpperCase(first);
        StringBuffer newName = new StringBuffer(name);
        newName.setCharAt(0, first);/*w w w .  j a  v  a  2s. co m*/
        return newName.toString();
    }
}

Related

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