Java ASCII from toAsciiLowerCase(char ch)

Here you can find the source of toAsciiLowerCase(char ch)

Description

Converts the specified character to lower case if it is a valid latin letter, otherwise the same character is returned.

License

Open Source License

Parameter

Parameter Description
ch a parameter

Return

the upper cased char

Declaration

public static char toAsciiLowerCase(char ch) 

Method Source Code

//package com.java2s;
/**//  w  w w  . j ava 2  s.  co m
 * Copyright 2011 The ARIES Consortium (http://www.ariesonline.org) and
 * www.integratedmodelling.org. 
    
   This file is part of Thinklab.
    
   Thinklab is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published
   by the Free Software Foundation, either version 3 of the License,
   or (at your option) any later version.
    
   Thinklab 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 for more details.
    
   You should have received a copy of the GNU General Public License
   along with Thinklab.  If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    /**
     * Converts the specified character to lower case if it is a valid latin
     * letter, otherwise the same character is returned.
     * 
     * @param ch
     * @return the upper cased char
     */
    public static char toAsciiLowerCase(char ch) {
        if ((ch >= 'A') && (ch <= 'Z')) {
            return (char) (ch + 'a' - 'A');
        } else {
            return ch;
        }
    }
}

Related

  1. toAsciiBytes(String str)
  2. toAsciiChar(byte b)
  3. toAsciiChar(int i)
  4. toASCIICode(byte[] bts)
  5. toAsciiFilename(String string)
  6. toAsciiString(byte[] buffer)
  7. toAsciiString(byte[] buffer, int startPos, int length)
  8. toAsciiString(byte[] bytes)
  9. toASCIIString(byte[] data)