Java String Capitalize First capitalizeFirstOnly(String original)

Here you can find the source of capitalizeFirstOnly(String original)

Description

capitalize First Only

License

Open Source License

Declaration

public static String capitalizeFirstOnly(String original) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String capitalizeFirstOnly(String original) {
        if (original == null) {
            return null;
        } else {//from  ww w . ja v  a2  s . c om
            String modified = original.toLowerCase();
            modified = Character.toUpperCase(modified.charAt(0)) + modified.substring(1, modified.length());
            return modified;
        }
    }
}

Related

  1. capitalizeFirstLetter(String str)
  2. capitalizeFirstLetter(String string)
  3. capitalizeFirstLetter(String string)
  4. capitalizeFirstLetter(String text)
  5. capitalizeFirstLetter(String[] strArr)
  6. capitalizeFirstOnly(String s)
  7. capitalizeTheFirstLetter(String input)