Java String Capitalize capitalize(String capitalizeMe)

Here you can find the source of capitalize(String capitalizeMe)

Description

capitalize

License

Open Source License

Declaration

public static String capitalize(String capitalizeMe) 

Method Source Code

//package com.java2s;
/* Copyright 2004 - 2008 Kasper Nielsen <kasper@codehaus.org> 
 * Licensed under the Apache 2.0 License. */

public class Main {
    public static String capitalize(String capitalizeMe) {
        if (capitalizeMe == null) {
            throw new NullPointerException("capitalizeMe is null");
        } else if (capitalizeMe.length() == 0) {
            return capitalizeMe;
        }/*w  ww.  j a  v  a  2 s .  c  o m*/
        return capitalizeMe.substring(0, 1).toUpperCase() + capitalizeMe.substring(1);
    }
}

Related

  1. capitalize(final String value)
  2. capitalize(final String value)
  3. capitalize(final String value)
  4. capitalize(final String value)
  5. capitalize(final String word)
  6. capitalize(String constraint)
  7. capitalize(String content)
  8. capitalize(String data)
  9. capitalize(String english)