Java String Capitalize capitalize(final String str)

Here you can find the source of capitalize(final String str)

Description

capitalize

License

Apache License

Declaration

public static String capitalize(final String str) 

Method Source Code

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

public class Main {
    public static String capitalize(final String str) {
        final char charAt = str.charAt(0);
        return Character.toUpperCase(charAt) + str.substring(1);
    }/*from w  w w . ja  va  2  s.c o m*/

    public static char toUpperCase(final char ch) {
        // TODO optimize
        return Character.toUpperCase(ch);
    }
}

Related

  1. capitalize(final String s)
  2. capitalize(final String str)
  3. capitalize(final String str)
  4. capitalize(final String str)
  5. capitalize(final String str)
  6. capitalize(final String str)
  7. capitalize(final String str)
  8. capitalize(final String str)
  9. capitalize(final String str)