Here you can find the source of toLowerCase(String string)
public static String toLowerCase(String string)
//package com.java2s; /******************************************************************************* * Copyright (c) 2011-2015 Red Hat, Inc. * Distributed under license by Red Hat, Inc. All rights reserved. * This program is made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors://w w w .j a v a 2 s . c o m * Red Hat, Inc. - initial API and implementation ******************************************************************************/ public class Main { public static String toLowerCase(String string) { if (isEmpty(string)) { return string; } return string.toLowerCase(); } /** * Returns true if value is null or empty string. * @param value * @return */ public static boolean isEmpty(String value) { return value == null || value.length() == 0; } public static boolean isEmpty(Object value) { return (value instanceof String) && isEmpty((String) value); } }