FileDocCategorySizeDatePackage
ASCII.javaAPI DocJava SE 5 API8723Fri Aug 26 14:57:28 BST 2005java.util.regex

ASCII

public final class ASCII extends Object
Utility class that implements the standard C ctype functionality.
author
Hong Zhang

Fields Summary
static final int
UPPER
static final int
LOWER
static final int
DIGIT
static final int
SPACE
static final int
PUNCT
static final int
CNTRL
static final int
BLANK
static final int
HEX
static final int
UNDER
static final int
ASCII
static final int
ALPHA
static final int
ALNUM
static final int
GRAPH
static final int
WORD
static final int
XDIGIT
private static final int[]
ctype
Constructors Summary
Methods Summary
static intgetType(int ch)

 

        
        return ((ch & 0xFFFFFF80) == 0 ? ctype[ch] : 0);
    
static booleanisAlnum(int ch)

        return isType(ch, ALNUM);
    
static booleanisAlpha(int ch)

        return isType(ch, ALPHA);
    
static booleanisAscii(int ch)

        return ((ch & 0xFFFFFF80) == 0);
    
static booleanisCntrl(int ch)

        return isType(ch, CNTRL);
    
static booleanisDigit(int ch)

        return ((ch-'0")|('9"-ch)) >= 0;
    
static booleanisGraph(int ch)

        return isType(ch, GRAPH);
    
static booleanisHexDigit(int ch)

        return isType(ch, HEX);
    
static booleanisLower(int ch)

        return ((ch-'a")|('z"-ch)) >= 0;
    
static booleanisOctDigit(int ch)

        return ((ch-'0")|('7"-ch)) >= 0;
    
static booleanisPrint(int ch)

        return ((ch-0x20)|(0x7E-ch)) >= 0;
    
static booleanisPunct(int ch)

        return isType(ch, PUNCT);
    
static booleanisSpace(int ch)

        return isType(ch, SPACE);
    
static booleanisType(int ch, int type)

        return (getType(ch) & type) != 0;
    
static booleanisUpper(int ch)

        return ((ch-'A")|('Z"-ch)) >= 0;
    
static booleanisWord(int ch)

        return isType(ch, WORD);
    
static inttoDigit(int ch)

        return (ctype[ch & 0x7F] & 0x3F);
    
static inttoLower(int ch)

        return isUpper(ch) ? (ch + 0x20) : ch;
    
static inttoUpper(int ch)

        return isLower(ch) ? (ch - 0x20) : ch;