com.google.common.base
Class Ascii

java.lang.Object
  extended by com.google.common.base.Ascii

@Beta
@GwtCompatible
public final class Ascii
extends Object

Static methods pertaining ASCII characters (those in the range of values 0x00 through 0x7F), and to strings containing such characters.

Since:
7
Author:
Craig Berry, Gregory Kick

Method Summary
static boolean isLowerCase(char c)
          Indicates whether c is one of the twenty-six lowercase ASCII alphabetic characters between 'a' and 'z' inclusive.
static boolean isUpperCase(char c)
          Indicates whether c is one of the twenty-six uppercase ASCII alphabetic characters between 'A' and 'Z' inclusive.
static char toLowerCase(char c)
          If the argument is an uppercase ASCII character returns the lowercase equivalent.
static String toLowerCase(String string)
          Returns a copy of the input string in which all uppercase ASCII characters have been converted to lowercase.
static char toUpperCase(char c)
          If the argument is a lowercase ASCII character returns the uppercase equivalent.
static String toUpperCase(String string)
          Returns a copy of the input string in which all lowercase ASCII characters have been converted to uppercase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toLowerCase

public static String toLowerCase(String string)
Returns a copy of the input string in which all uppercase ASCII characters have been converted to lowercase. All other characters are copied without modification.


toLowerCase

public static char toLowerCase(char c)
If the argument is an uppercase ASCII character returns the lowercase equivalent. Otherwise returns the argument.


toUpperCase

public static String toUpperCase(String string)
Returns a copy of the input string in which all lowercase ASCII characters have been converted to uppercase. All other characters are copied without modification.


toUpperCase

public static char toUpperCase(char c)
If the argument is a lowercase ASCII character returns the uppercase equivalent. Otherwise returns the argument.


isLowerCase

public static boolean isLowerCase(char c)
Indicates whether c is one of the twenty-six lowercase ASCII alphabetic characters between 'a' and 'z' inclusive. All others (including non-ASCII characters) return false.


isUpperCase

public static boolean isUpperCase(char c)
Indicates whether c is one of the twenty-six uppercase ASCII alphabetic characters between 'A' and 'Z' inclusive. All others (including non-ASCII characters) return false.