Java String Capitalize capitalize(String src)

Here you can find the source of capitalize(String src)

Description

capitalize

License

Open Source License

Declaration

public static String capitalize(String src) 

Method Source Code

//package com.java2s;

public class Main {
    public static String capitalize(String src) {

        StringBuffer buffer = new StringBuffer(src.length());

        char c = src.charAt(0);
        buffer.append(Character.toTitleCase(c));
        for (int i = 1; i < src.length(); i++) {
            buffer.append(src.charAt(i));
        }/*from   ww  w . j  a  v a 2  s  .  com*/
        return buffer.toString();
    }
}

Related

  1. capitalize(String s)
  2. capitalize(String s)
  3. capitalize(String s, char delimiter)
  4. capitalize(String s, String fullstring)
  5. capitalize(String source)
  6. capitalize(String str)
  7. capitalize(String str)
  8. capitalize(String str)
  9. capitalize(String str)