Java String Upper Case toUpperCaseFirst(String text)

Here you can find the source of toUpperCaseFirst(String text)

Description

to Upper Case First

License

Apache License

Declaration

public static String toUpperCaseFirst(String text) 

Method Source Code

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

public class Main {

    public static String toUpperCaseFirst(String text) {
        return text.substring(0, 1).toUpperCase() + text.substring(1);
    }//from w  w  w  .  jav  a 2  s . c om

    public static String subString(String src, int length) {
        if (src == null) {
            return null;
        }
        int i = src.length();
        if (i > length) {
            return src.substring(0, length);
        }
        return src;
    }
}

Related

  1. toUpperCaseAtFirstChar(String string)
  2. toUpperCaseFirst(String str)
  3. toUpperCaseFirst(String str)
  4. toUpperCaseFirst(String str)
  5. toUpperCaseFirst(String text)
  6. toUpperCaseFirstAll(String text)
  7. toUpperCaseFirstChar(final String str)
  8. toUpperCaseFirstChar(String s)
  9. toUpperCaseFirstChar(String str)