Lowercase the first character of a given String.

@param str to have the first character upper cased.
@return a new String with the first character in uppercase.
430875
public static String toLowerFirstChar(final String str)
    {
        return Character.toLowerCase(str.charAt(0)) + str.substring(1);
    }
29837
private static boolean isNameCase(String str) {
    if (str.length() < 2) {
      return false;
    }
    if (!(Character.isUpperCase(str.charAt(0)) || Character.isTitleCase(str.charAt(0)))) {
      return false;
    }
    for (int i = 1; i < str.length(); i++) {
      if (Character.isUpperCase(str.charAt(i))) {
        return false;
      }
    }
    return true;
  }
230912
public AsciiString toLowerCase() {
        boolean lowercased = true;
        int i, j;
        final int len = length() + arrayOffset();
        for (i = arrayOffset(); i < len; ++i) {
            byte b = value[i];
            if (b >= 'A' && b <= 'Z') {
                lowercased = false;
                break;
            }
        }

        // Check if this string does not contain any uppercase characters.
        if (lowercased) {
            return this;
        }

        final byte[] newValue = PlatformDependent.allocateUninitializedArray(length());
        for (i = 0, j = arrayOffset(); i < newValue.length; ++i, ++j) {
            newValue[i] = toLowerCase(value[j]);
        }

        return new AsciiString(newValue, false);
    }
186478
public static String toFirstLower( String name ) {
        if ( isEmpty( name )) {
            return name;
        }
        return "" + name.toLowerCase( Locale.ROOT ).charAt(0) + name.substring(1);
    }
1281871
public static String toLowerCamel(String str) {
        String s = str;
        if (s == null) {
            return null;
        }
        if (str.isEmpty()) {
            return str;
        }
        // 无下划线或连词符
        if (s.indexOf(SEPARATOR_UNDER_LINE) < 0 && s.indexOf(SEPARATOR_HYPHEN_LINE) < 0) {
            if (Character.isLowerCase(s.charAt(0))) {
                return s;
            } else if (Pattern.matches("^[A-Z]{2,}", s)) {
                s = s.toLowerCase();
            }
            return s.substring(0, 1)
                    .toLowerCase() + s.substring(1);

        }
        s = s.toLowerCase();
        StringBuilder sb = new StringBuilder(s.length());
        boolean upperCase = false;
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (c == SEPARATOR_UNDER_LINE || c == SEPARATOR_HYPHEN_LINE) {
                upperCase = true;
            } else if (upperCase) {
                sb.append(Character.toUpperCase(c));
                upperCase = false;
            } else {
                sb.append(c);
            }
        }
        return sb.toString();
    }
478430
public static function camelCase($str, $firstChar = 'lcfirst')
    {
        $str = str_replace(['-', '_', '.'], ' ', $str);
        $str = mb_convert_case($str, MB_CASE_TITLE);
        $str = str_replace(' ', '', $str); //ucwords('ghjkiol|ghjklo', "|");
        
        if (!function_exists($firstChar)) {
            $firstChar = 'lcfirst';
        }
        $str = call_user_func($firstChar, $str);
        
        return $str;
    }
10669
public static String toLowerCaseWithUnderscore(final String str) {
        if (N.isNullOrEmpty(str)) {
            return str;
        }

        String result = lowerCaseWithUnderscorePropNamePool.get(str);

        if (result == null) {
            result = StringUtil.toLowerCaseWithUnderscore(str);
            lowerCaseWithUnderscorePropNamePool.put(str, result);
        }

        return result;
    }
495395
public static String toFirstLower(String string) {
		int c = ((int) string.charAt(0));
		if (c >= 65 && c <=90) {
			// is upper
			char lower = (char) (((int) string.charAt(0)) + 32);
			return lower + string.substring(1);
		}
		return string;
	}
1182987
public static int getStringCase(String str) {
        if (str.length() == 0) {
            return MIXED;
        }

        int state = -1;

        char ch = str.charAt(0);
        if (Character.isLetter(ch)) {
            if (Character.isUpperCase(ch)) {
                state = UPPER_CASE;
            } else {
                state = LOWER_CASE;
            }
        }

        for (int i = 1; i < str.length(); i++) {
            ch = str.charAt(i);
            if (!Character.isLetter(ch)) {
                continue;
            }

            switch (state) {
                case UPPER_CASE:
                    if (Character.isLowerCase(ch)) {
                        if (i == 1) {
                            state = TITLE_CASE;
                        } else {
                            return MIXED;
                        }
                    }
                    break;
                case LOWER_CASE:
                case TITLE_CASE:
                    if (Character.isUpperCase(ch)) {
                        return MIXED;
                    }
                    break;
            }
        }

        return state;
    }
431861
public static String firstUpperCase(String s) {
		String first = s.length() > 0 ? s.substring(0, 1).toUpperCase() : "";
		String second = s.length() > 1 ? s.substring(1).toLowerCase() : "";
		return first + second;
	}
943239
private String
sanitize(String str) {
	if (wordcase == CASE_UPPER)
		return str.toUpperCase();
	else if (wordcase == CASE_LOWER)
		return str.toLowerCase();
	return str;
}
566084
public static String toLowerString(String s) {
        int len = s.length();
        int idx = 0;
        for (; idx < len; idx++) {
            if (isUpper(s.charAt(idx))) {
                break;
            }
        }
        if (idx == len) {
            return s;
        }

        char[] buf = new char[len];
        for (int i = 0; i < len; i++) {
            char c = s.charAt(i);
            buf[i] = (i < idx) ? c : toLower(c);
        }
        return new String(buf);
    }
1291344
@Nullable
  public static String uppercaseFirstChar(String str, Language language) {
    if (language != null && "nl".equals(language.getShortCode()) && str != null && str.toLowerCase().startsWith("ij")) {
      // hack to fix https://github.com/languagetool-org/languagetool/issues/148
      return "IJ" + str.substring(2);
    } else {
      return changeFirstCharCase(str, true);
    }
  }
613695
public static String initCap(String str) {
        assertStringNotNull(str);
        if (is_Null_or_Empty(str)) {
            return str;
        }
        if (str.length() == 1) {
            return str.toUpperCase();
        }
        final char chars[] = str.toCharArray();
        chars[0] = Character.toUpperCase(chars[0]);
        return new String(chars);
    }
208897
private static String decode(final String str) {
        if (str == null) {
            return null;
        }

        for (int i = 0; i < str.length(); ++i) {
            if (str.charAt(i) == '%') {
                return decode(str, i);
            }
        }

        return str;
    }
343169
public boolean startsWith(final String str) {
        if (str == null) {
            return false;
        }
        final int len = str.length();
        if (len == 0) {
            return true;
        }
        if (len > size) {
            return false;
        }
        for (int i = 0; i < len; i++) {
            if (buffer[i] != str.charAt(i)) {
                return false;
            }
        }
        return true;
    }
291553
public static String upperCaseFirstChar(String _str) {
        if (_str == null) {
            return null;
        }
        if (_str.isEmpty()) {
            return _str;
        }
        return _str.substring(0, 1).toUpperCase() + _str.substring(1);
    }