sisc.reader
Class CharUtil

java.lang.Object
  extended by sisc.reader.CharUtil

public abstract class CharUtil
extends java.lang.Object


Constructor Summary
CharUtil()
           
 
Method Summary
static java.lang.String charToEscaped(char c)
           
static java.lang.String charToEscapedIfNecessary(char c)
           
static java.lang.String charToHex(char c)
           
static java.lang.String charToNamedConst(SchemeCharacter c)
          Retreives the human readable character name of the given SchemeCharacter
static java.lang.String charToOct(char c)
           
static int escapedToChar(char c)
          Converts an escaped character to its real equivalent
static int escapeSequenceToChar(java.io.PushbackReader is)
           
static char hexToChar(java.lang.String hex)
           
static SchemeCharacter namedConstToChar(java.lang.String namedCharConstant)
          Converts a human readable character name into the SchemeCharacter it represents.
static char octToChar(java.lang.String oct)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharUtil

public CharUtil()
Method Detail

namedConstToChar

public static SchemeCharacter namedConstToChar(java.lang.String namedCharConstant)
Converts a human readable character name into the SchemeCharacter it represents.

Parameters:
namedCharConstant - The human readable name of the character, e.g. "tab"
Returns:
The SchemeCharacter named, or null if no such character exists

charToNamedConst

public static java.lang.String charToNamedConst(SchemeCharacter c)
Retreives the human readable character name of the given SchemeCharacter

Parameters:
c - The SchemeCharacter to attempt to convert
Returns:
The SchemeCharacter The human readable name of the character, e.g. "tab", or null if no human readable name exists

escapedToChar

public static int escapedToChar(char c)
Converts an escaped character to its real equivalent

Parameters:
c - The character following the escape char ('\')
Returns:
The real character represented by the escaped input

escapeSequenceToChar

public static int escapeSequenceToChar(java.io.PushbackReader is)
                                throws java.io.IOException
Throws:
java.io.IOException

charToEscapedIfNecessary

public static java.lang.String charToEscapedIfNecessary(char c)

charToEscaped

public static java.lang.String charToEscaped(char c)

octToChar

public static char octToChar(java.lang.String oct)

hexToChar

public static char hexToChar(java.lang.String hex)

charToOct

public static java.lang.String charToOct(char c)

charToHex

public static java.lang.String charToHex(char c)