Checks whether the character is ASCII 7 bit alphabetic lower case. - Java java.lang

Java examples for java.lang:char

Description

Checks whether the character is ASCII 7 bit alphabetic lower case.

Demo Code

/*//  w w  w  . j av a  2s  .c om
 * Copyright (c) 2007-2016 AREasy Runtime
 *
 * This library, AREasy Runtime and API for BMC Remedy AR System, is free software ("Licensed Software");
 * you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either version 2.1 of the License,
 * or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * including but not limited to, the implied warranty of MERCHANTABILITY, NONINFRINGEMENT,
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 */
//package com.java2s;

public class Main {
    /**
     * <p>Checks whether the character is ASCII 7 bit alphabetic lower case.</p>
     * <p/>
     * <pre>
     *   CharUtility.isAsciiAlphaLower('a')  = true
     *   CharUtility.isAsciiAlphaLower('A')  = false
     *   CharUtility.isAsciiAlphaLower('3')  = false
     *   CharUtility.isAsciiAlphaLower('-')  = false
     *   CharUtility.isAsciiAlphaLower('\n') = false
     *   CharUtility.isAsciiAlphaLower('&copy;') = false
     * </pre>
     *
     * @param ch the character to check
     * @return true if between 97 and 122 inclusive
     */
    public static boolean isAsciiAlphaLower(char ch) {
        return ch >= 'a' && ch <= 'z';
    }
}

Related Tutorials