Java String Upper Case toUpperCaseFirstOne(String s)

Here you can find the source of toUpperCaseFirstOne(String s)

Description

to Upper Case First One

License

Apache License

Declaration

public static String toUpperCaseFirstOne(String s) 

Method Source Code

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

public class Main {
    public static String toUpperCaseFirstOne(String s) {
        if (Character.isUpperCase(s.charAt(0)))
            return s;
        else//from   ww  w .  j  a v a2s . c  o  m
            return (new StringBuilder()).append(Character.toUpperCase(s.charAt(0))).append(s.substring(1))
                    .toString();
    }
}

Related

  1. toUpperCaseFirstCharForWord(String string)
  2. toUpperCaseFirstLetter(String str)
  3. toUppercaseFirstLetter(String str)
  4. toUpperCaseFirstLetter(StringBuilder sb)
  5. toUpperCaseFirstOne(String origin)
  6. toUpperCaseHead(String str)
  7. toUppercaseHeadCharactor(String str)
  8. toUpperCaseIdent(String ident)
  9. toUpperCaseName(String s)