Java Utililty Methods String Lower Case

List of utility methods to do String Lower Case

Description

The list of methods to do String Lower Case are organized into topic(s).

Method

StringtoLowerCase(String source)
This method returns the lower case version of the source string.
String returnValue = "";
if (isSet(source)) {
    returnValue = source.toLowerCase();
return returnValue;
StringtoLowerCase(String str)
cast a string a lower case String, is faster than the String.toLowerCase, if all Character are already Low Case
int len = str.length();
char c;
for (int i = 0; i < len; i++) {
    c = str.charAt(i);
    if (!((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9'))) {
        return str.toLowerCase();
return str;
StringtoLowerCase(String str)
to Lower Case
if (str == null) {
    return null;
} else {
    str = str.trim();
    if (str.length() == 0) {
        return null;
    } else {
        return str.toLowerCase();
...
StringtoLowerCase(String str)
to Lower Case
StringBuffer buffer = new StringBuffer(str);
for (int i = 0; i < buffer.length(); i++) {
    char c = buffer.charAt(i);
    buffer.setCharAt(i, Character.toLowerCase(c));
return buffer.toString();
StringtoLowerCase(String str)
to Lower Case
String newStr = convertBasicLatinToLower(str);
if (newStr == null) {
    return str.toLowerCase();
return newStr;
StringtoLowerCase(String str)
Non-localized version, be careful
if (str != null) {
    return str.toLowerCase();
return null;
StringtoLowerCase(String str)
to Lower Case
if (str == null) {
    return null;
return str.toLowerCase();
StringtoLowerCase(String string)
A locale independent version of toLowerCase.
boolean changed = false;
char[] chars = string.toCharArray();
for (int i = 0; i != chars.length; i++) {
    char ch = chars[i];
    if ('A' <= ch && 'Z' >= ch) {
        changed = true;
        chars[i] = (char) (ch - 'A' + 'a');
if (changed) {
    return new String(chars);
return string;
StringtoLowerCase(String string)
to Lower Case
if (isEmpty(string)) {
    return string;
return string.toLowerCase();
StringtoLowerCase(String text)
to Lower Case
if (text != null) {
    int len = text.length();
    if (len > 0) {
        char[] buf = new char[len];
        for (int i = 0; i < len; i++) {
            buf[i] = Character.toLowerCase(text.charAt(i));
        text = new String(buf);
...