Java String Lower Case toLowerCase(String source)

Here you can find the source of toLowerCase(String source)

Description

This method returns the lower case version of the source string.

License

Open Source License

Parameter

Parameter Description
source The source string.

Return

The lower case version of the string.

Declaration

public static String toLowerCase(String source) 

Method Source Code

//package com.java2s;
/**/*from w  ww .ja  va2  s.  co  m*/
 * (c) 2008 Cordys R&D B.V. All rights reserved. The computer program(s) is the
 * proprietary information of Cordys B.V. and provided under the relevant
 * License Agreement containing restrictions on use and disclosure. Use is
 * subject to the License Agreement.
 */

public class Main {
    /**
     * This method returns the lower case version of the source string. This method could be used in
     * a BPM to accommodate the lack of this function in XPath 1.0
     *
     * @param   source  The source string.
     *
     * @return  The lower case version of the string.
     */
    public static String toLowerCase(String source) {
        String returnValue = "";

        if (isSet(source)) {
            returnValue = source.toLowerCase();
        }

        return returnValue;
    }

    /**
     * This method returns whether or not a string is filled.
     *
     * @param   source  The source to check.
     *
     * @return  true if the string is set. Otherwise false.
     */
    public static boolean isSet(String source) {
        return (source != null) && (source.trim().length() > 0);
    }
}

Related

  1. toLowerCase(String pString)
  2. toLowerCase(String s)
  3. toLowerCase(String s)
  4. toLowerCase(String s)
  5. toLowerCase(String s, int start, int end)
  6. toLowerCase(String str)
  7. toLowerCase(String str)
  8. toLowerCase(String str)
  9. toLowerCase(String str)