Here you can find the source of toLowerCase(String value)
Converts the given value to lower case.
Parameter | Description |
---|---|
value | The string value, may be null. |
public static String toLowerCase(String value)
//package com.java2s; //License from project: Apache License public class Main { /**//from w ww . ja v a 2 s.c o m * <p> * Converts the given value to lower case. * </p> * <p/> * <pre> * toLowerCase(null) = null * toLowerCase("") = "" * toLowerCase("aBc") = "abc" * toLowerCase("abc") = "abc" * toLowerCase(" ABC ") = "abc" * </pre> * * @param value * The string value, may be null. * @return the given {@code value} converted to lower case or {@code null}. */ public static String toLowerCase(String value) { if (value == null) { return null; } return value.trim().toLowerCase(); } /** * Trims the given {@code value}. * * @param value * The value to trim. * @return the given {@code value} trimmed or {@code null}. */ public static String trim(String value) { if (value == null) { return null; } return value.trim(); } }