Java String Capitalize capitalizeMethodName(String methodName)

Here you can find the source of capitalizeMethodName(String methodName)

Description

This method capitalized the first character of methodName.

License

Open Source License

Parameter

Parameter Description
methodName a parameter

Declaration

public static String capitalizeMethodName(String methodName) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from w  w w  . ja  v a2  s . com*/
     * This method capitalized the first character of <code>methodName</code>.
     * <p/>
     * 
     * eg.
     * <pre>
     *   capitalizeMethodName("someMethod");
     * </pre>
     * 
     * will return "SomeMethod".
     * 
     * @param methodName
     * @return
     */
    public static String capitalizeMethodName(String methodName) {
        assert (methodName != null);
        return methodName = methodName.substring(0, 1).toUpperCase() + methodName.substring(1);
    }
}

Related

  1. capitalizeFormat(String string)
  2. capitalizeFront(String str)
  3. capitalizeHeadingCharacter(final String value)
  4. capitalizeInitial(String str)
  5. capitalizeMessage(String message)
  6. capitalizeName(final String name)
  7. capitalizeName(String name)
  8. capitalizePackageName(final String packageName)
  9. capitalizePlayerName(String name)