Java Char Lower Case toLowerCase(final char c)

Here you can find the source of toLowerCase(final char c)

Description

to Lower Case

License

Open Source License

Declaration

public static char toLowerCase(final char c) 

Method Source Code

//package com.java2s;
/*/*from  www.  j a  v a2 s  . c om*/
 * Copyright (c) 2015 Gargoyle Software Inc.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (http://www.gnu.org/licenses/).
 */

public class Main {
    public static char toLowerCase(final char c) {
        return (char) toLowerCase((int) c);
    }

    public static int toLowerCase(final int c) {
        if (c < 128) {
            return ('A' <= c && c <= 'Z') ? (c + ('a' - 'A')) : c;
        }
        // Do not convert non-ASCII upper case character to ASCII lower case.
        final int lower = Character.toLowerCase(c);
        return (lower < 128) ? c : lower;

    }
}

Related

  1. toLowerCase(char[] word, char[] buffer)
  2. toLowerCase(CharSequence chars)
  3. toLowerCase(CharSequence string)
  4. toLowerCase(final char a)
  5. toLowerCase(final char a)
  6. toLowerCase(final char[] buffer, final int offset, final int limit)
  7. toLowerCase(int character_)
  8. toLowerCaseAtFirstChar(String string)
  9. toLowerCaseFirstChar(final String str)