Packagesystem
Classpublic class Char
InheritanceChar Inheritance Object

The Char class.

Note: Very basic implementation for now based on ASCII and so http://www.ietf.org/rfc/rfc20.txt later we should connect it to Unicode class and Unicode cateogories or maybe do another CharUTF class.



Public Properties
 PropertyDefined By
  alphabetics : Array
[static] [read-only] The Array representation of all ASCII alphabetics characters
Char
  alphabeticsUpper : Array
[static] [read-only] The Array representation of all ASCII alphabetics characters (upper case).
Char
  code : Number
Determinates the code of the character.
Char
  controls : Array
[static] The Array representation of all ASCII controls characters.
Char
  symbols : Array
[static] The Array representation of all ASCII symbols characters.
Char
  value : String
Determinates the value of the character.
Char
Public Methods
 MethodDefined By
  
Char(str:String, index:uint = 0)
Creates a new Char instance.
Char
  
fromNumber(num:Number):Char
[static] Returns the Char representation of the specified Number value.
Char
  
isASCII(extended:Boolean = false):Boolean
Indicates if the character is an ASCII character.
Char
  
isASCII(c:String, index:uint = 0, extended:Boolean = false):Boolean
[static]
Char
  
isContained(charset:String):Boolean
Indicates if the character is contained in a serie of chars (or charset)
Char
  
isContained(c:String, index:uint = 0, charset:String):Boolean
[static]
Char
  
isControl():Boolean
Indicates if the character is a control representation.
Char
  
isControl(c:String, index:uint = 0):Boolean
[static]
Char
  
isDigit():Boolean
Indicates if the character is a digit representation.
Char
  
isDigit(c:String, index:uint = 0):Boolean
[static] Indicates if the specified character is a digit character.
Char
  
isHexDigit():Boolean
Indicates if the character is a hexadecimal digit representation.
Char
  
isHexDigit(c:String, index:uint = 0):Boolean
[static] Indicates if the specified character is an hexadecimal digit character.
Char
  
isLetter():Boolean
Indicates if the character is a uppercase or a lowercase letter.
Char
  
isLetter(c:String, index:uint = 0):Boolean
[static] Indicates if the specified character is a letter.
Char
  
isLetterOrDigit():Boolean
Indicates if the character is a letter or a digit.
Char
  
isLetterOrDigit(c:String, index:uint = 0):Boolean
[static] Indicates if the specified character is a letter or a digit.
Char
  
isLower():Boolean
Indicates if the character is lowercase.
Char
  
isLower(c:String, index:uint = 0):Boolean
[static] Indicates if the specified character is a lower case.
Char
  
isSymbol():Boolean
Indicates if the character is a symbol.
Char
  
isSymbol(c:String, index:uint = 0):Boolean
[static] Indicates if the specified character is a symbol.
Char
  
isUnicode():Boolean
Indicates if the character is unicode.
Char
  
isUnicode(c:String, index:uint = 0):Boolean
[static] Indicates if the specified character is a unicode char.
Char
  
isUpper():Boolean
Indicates if the character is uppercase.
Char
  
isUpper(c:String, index:uint = 0):Boolean
[static] Indicates if the specified character is a upper char.
Char
  
isWhiteSpace():Boolean
Indicates if the character is a whitespace.
Char
  
isWhiteSpace(c:String, index:uint = 0):Boolean
[static] Indicates if the specified character is a whitespace char.
Char
  
toHexadecimal():String
Converts the character in this hexadecimal code number representation.
Char
  
Char
  
toNumber():Number
Converts the character in this code number representation.
Char
  
toOctal():String
Converts the character in this octal code number representation.
Char
  
toString():String
Returns the String representation of the object.
Char
  
Char
  
valueOf():String
Returns the String representation of the object.
Char
Public Constants
 ConstantDefined By
  ACK : Char
[static] The "acknowledge" unicode character.
Char
  ampersand : Char
[static] The ampersand unicode character.
Char
  apostrophe : Char
[static] The apostrophe unicode character.
Char
  asterisk : Char
[static] The asterisk closing single quotation mark, acute accent unicode character.
Char
  backslash : Char
[static] The reverse slant "\\" unicode character.
Char
  BEL : Char
[static] The "bell" unicode character.
Char
  BS : Char
[static] The "backspace" unicode character.
Char
  CAN : Char
[static] The "cancel" unicode character.
Char
  circumflex : Char
[static] The circumflex "^" character.
Char
  closingBrace : Char
[static] The closing brace "}" character.
Char
  closingBracket : Char
[static] The closing bracket "]" character.
Char
  closingParenthesis : Char
[static] The ")" unicode character.
Char
  colon : Char
[static] The colon ":" unicode character.
Char
  comma : Char
[static] The comma unicode character.
Char
  commercialAt : Char
[static] The "" unicode character.
Char
  CR : Char
[static] The "carriage return" unicode character.
Char
  DC1 : Char
[static] The "device control 1" unicode character.
Char
  DC2 : Char
[static] The "device control 2" unicode character.
Char
  DC3 : Char
[static] The "device control 3" unicode character.
Char
  DC4 : Char
[static] The "device control 4" unicode character.
Char
  DEL : Char
[static] The "DEL" unicode character.
Char
  DLE : Char
[static] The "data link escape" unicode character.
Char
  dollarSign : Char
[static] The "$" unicode character.
Char
  EM : Char
[static] The "end of medium" unicode character.
Char
  ENQ : Char
[static] The "enquiry" unicode character.
Char
  EOT : Char
[static] The "end of transmission" unicode character.
Char
  equals : Char
[static] The equals unicode character.
Char
  ESC : Char
[static] The "escape" unicode character.
Char
  ETB : Char
[static] The "end of transmission block" unicode character.
Char
  ETX : Char
[static] The "end of test" unicode character.
Char
  exclamationPoint : Char
[static] The "!" unicode character.
Char
  FF : Char
[static] The "NP form feed, new page" unicode character.
Char
  FS : Char
[static] The "file separator" unicode character.
Char
  graveAccent : Char
[static] The grave accent "`" character.
Char
  greaterThen : Char
[static] The greaterThen ">" unicode character.
Char
  GS : Char
[static] The "group separator" unicode character.
Char
  lessThan : Char
[static] The lessThan "<" unicode character.
Char
  LF : Char
[static] The "NL line feed, new line" unicode character.
Char
  minus : Char
[static] The minus (hyphen) unicode character.
Char
  NAK : Char
[static] The "negative acknowledge" unicode character.
Char
  NUL : Char
[static] The "null" unicode character.
Char
  numberSign : Char
[static] The "#" unicode character.
Char
  openingBrace : Char
[static] The opening brace "{" character.
Char
  openingBracket : Char
[static] The "" unicode character.
Char
  openingParenthesis : Char
[static] The "" unicode character.
Char
  percent : Char
[static] The percent unicode character.
Char
  period : Char
[static] The decimal point (period) unicode character.
Char
  pipe : Char
[static] The vertical line "|" character.
Char
  plus : Char
[static] The plus unicode character.
Char
  questionMark : Char
[static] The questionMark "?" unicode character.
Char
  quotationMarks : Char
[static] The "\" unicode character.
Char
  RS : Char
[static] The "record separator" unicode character.
Char
  semiColon : Char
[static] The semiColon ";" unicode character.
Char
  SI : Char
[static] The "shift in" unicode character.
Char
  slash : Char
[static] The slash (slant) unicode character.
Char
  SO : Char
[static] The "shift out" unicode character.
Char
  SOH : Char
[static] The "start of heading" unicode character.
Char
  space : Char
[static] The "space" unicode character.
Char
  STX : Char
[static] The "start of text" unicode character.
Char
  SUB : Char
[static] The "substitute" unicode character.
Char
  SYN : Char
[static] The "synchronous idle" unicode character.
Char
  TAB : Char
[static] The "horizontal tab" unicode character.
Char
  tilde : Char
[static] The "-" overline, general accent character.
Char
  underline : Char
[static] The underline "_" character.
Char
  US : Char
[static] The "unit separator" unicode character.
Char
  VT : Char
[static] The "vertical tab" unicode character.
Char
Property Detail
alphabeticsproperty
alphabetics:Array  [read-only]

The Array representation of all ASCII alphabetics characters


Implementation
    public static function get alphabetics():Array
alphabeticsUpperproperty 
alphabeticsUpper:Array  [read-only]

The Array representation of all ASCII alphabetics characters (upper case).


Implementation
    public static function get alphabeticsUpper():Array
codeproperty 
code:Number

Determinates the code of the character.


Implementation
    public function get code():Number
    public function set code(value:Number):void
controlsproperty 
public static var controls:Array

The Array representation of all ASCII controls characters.

symbolsproperty 
public static var symbols:Array

The Array representation of all ASCII symbols characters.

valueproperty 
value:String

Determinates the value of the character.


Implementation
    public function get value():String
    public function set value(value:String):void
Constructor Detail
Char()Constructor
public function Char(str:String, index:uint = 0)

Creates a new Char instance.

Parameters
str:String — String expression use to get a char.
 
index:uint (default = 0) — index of the character to get in the String (default 0).
Method Detail
fromNumber()method
public static function fromNumber(num:Number):Char

Returns the Char representation of the specified Number value.

Parameters

num:Number

Returns
Char — the Char representation of the specified Number value.
isASCII()method 
public function isASCII(extended:Boolean = false):Boolean

Indicates if the character is an ASCII character.

Parameters

extended:Boolean (default = false) — Indicates if the method test an extented ASCII character.

Returns
Boolean
isASCII()method 
public static function isASCII(c:String, index:uint = 0, extended:Boolean = false):Boolean

Parameters

c:String
 
index:uint (default = 0)
 
extended:Boolean (default = false)

Returns
Boolean
isContained()method 
public function isContained(charset:String):Boolean

Indicates if the character is contained in a serie of chars (or charset)

Parameters

charset:String — a list of characters

Returns
Boolean
isContained()method 
public static function isContained(c:String, index:uint = 0, charset:String):Boolean

Parameters

c:String
 
index:uint (default = 0)
 
charset:String

Returns
Boolean
isControl()method 
public function isControl():Boolean

Indicates if the character is a control representation.

Returns
Boolean
isControl()method 
public static function isControl(c:String, index:uint = 0):Boolean

Parameters

c:String
 
index:uint (default = 0)

Returns
Boolean
isDigit()method 
public function isDigit():Boolean

Indicates if the character is a digit representation.

Returns
Boolean
isDigit()method 
public static function isDigit(c:String, index:uint = 0):Boolean

Indicates if the specified character is a digit character.

Parameters

c:String
 
index:uint (default = 0)

Returns
Boolean
isHexDigit()method 
public function isHexDigit():Boolean

Indicates if the character is a hexadecimal digit representation.

Returns
Boolean
isHexDigit()method 
public static function isHexDigit(c:String, index:uint = 0):Boolean

Indicates if the specified character is an hexadecimal digit character.

Parameters

c:String
 
index:uint (default = 0)

Returns
Boolean
isLetter()method 
public function isLetter():Boolean

Indicates if the character is a uppercase or a lowercase letter.

Returns
Boolean
isLetter()method 
public static function isLetter(c:String, index:uint = 0):Boolean

Indicates if the specified character is a letter.

Parameters

c:String
 
index:uint (default = 0)

Returns
Boolean
isLetterOrDigit()method 
public function isLetterOrDigit():Boolean

Indicates if the character is a letter or a digit.

Returns
Boolean
isLetterOrDigit()method 
public static function isLetterOrDigit(c:String, index:uint = 0):Boolean

Indicates if the specified character is a letter or a digit.

Parameters

c:String
 
index:uint (default = 0)

Returns
Boolean
isLower()method 
public function isLower():Boolean

Indicates if the character is lowercase.

Returns
Boolean
isLower()method 
public static function isLower(c:String, index:uint = 0):Boolean

Indicates if the specified character is a lower case.

Parameters

c:String
 
index:uint (default = 0)

Returns
Boolean
isSymbol()method 
public function isSymbol():Boolean

Indicates if the character is a symbol.

Returns
Boolean
isSymbol()method 
public static function isSymbol(c:String, index:uint = 0):Boolean

Indicates if the specified character is a symbol.

Parameters

c:String
 
index:uint (default = 0)

Returns
Boolean
isUnicode()method 
public function isUnicode():Boolean

Indicates if the character is unicode.

Returns
Boolean
isUnicode()method 
public static function isUnicode(c:String, index:uint = 0):Boolean

Indicates if the specified character is a unicode char.

Parameters

c:String
 
index:uint (default = 0)

Returns
Boolean
isUpper()method 
public function isUpper():Boolean

Indicates if the character is uppercase.

Returns
Boolean
isUpper()method 
public static function isUpper(c:String, index:uint = 0):Boolean

Indicates if the specified character is a upper char.

Parameters

c:String
 
index:uint (default = 0)

Returns
Boolean
isWhiteSpace()method 
public function isWhiteSpace():Boolean

Indicates if the character is a whitespace.

Returns
Boolean
isWhiteSpace()method 
public static function isWhiteSpace(c:String, index:uint = 0):Boolean

Indicates if the specified character is a whitespace char.

Parameters

c:String
 
index:uint (default = 0)

Returns
Boolean
toHexadecimal()method 
public function toHexadecimal():String

Converts the character in this hexadecimal code number representation.

Returns
String
toLower()method 
public function toLower():Char

Returns
Char
toNumber()method 
public function toNumber():Number

Converts the character in this code number representation.

Returns
Number
toOctal()method 
public function toOctal():String

Converts the character in this octal code number representation.

Returns
String
toString()method 
public function toString():String

Returns the String representation of the object.

Returns
String — the String representation of the object.
toUpper()method 
public function toUpper():Char

Returns
Char
valueOf()method 
public function valueOf():String

Returns the String representation of the object.

Returns
String — the String representation of the object.
Constant Detail
ACKConstant
public static const ACK:Char

The "acknowledge" unicode character.

ampersandConstant 
public static const ampersand:Char

The ampersand unicode character.

apostropheConstant 
public static const apostrophe:Char

The apostrophe unicode character.

asteriskConstant 
public static const asterisk:Char

The asterisk closing single quotation mark, acute accent unicode character.

backslashConstant 
public static const backslash:Char

The reverse slant "\\" unicode character.

BELConstant 
public static const BEL:Char

The "bell" unicode character.

BSConstant 
public static const BS:Char

The "backspace" unicode character.

CANConstant 
public static const CAN:Char

The "cancel" unicode character.

circumflexConstant 
public static const circumflex:Char

The circumflex "^" character.

closingBraceConstant 
public static const closingBrace:Char

The closing brace "}" character.

closingBracketConstant 
public static const closingBracket:Char

The closing bracket "]" character.

closingParenthesisConstant 
public static const closingParenthesis:Char

The ")" unicode character.

colonConstant 
public static const colon:Char

The colon ":" unicode character.

commaConstant 
public static const comma:Char

The comma unicode character.

commercialAtConstant 
public static const commercialAt:Char

The "" unicode character.

CRConstant 
public static const CR:Char

The "carriage return" unicode character.

DC1Constant 
public static const DC1:Char

The "device control 1" unicode character.

DC2Constant 
public static const DC2:Char

The "device control 2" unicode character.

DC3Constant 
public static const DC3:Char

The "device control 3" unicode character.

DC4Constant 
public static const DC4:Char

The "device control 4" unicode character.

DELConstant 
public static const DEL:Char

The "DEL" unicode character.

DLEConstant 
public static const DLE:Char

The "data link escape" unicode character.

dollarSignConstant 
public static const dollarSign:Char

The "$" unicode character.

EMConstant 
public static const EM:Char

The "end of medium" unicode character.

ENQConstant 
public static const ENQ:Char

The "enquiry" unicode character.

EOTConstant 
public static const EOT:Char

The "end of transmission" unicode character.

equalsConstant 
public static const equals:Char

The equals unicode character.

ESCConstant 
public static const ESC:Char

The "escape" unicode character.

ETBConstant 
public static const ETB:Char

The "end of transmission block" unicode character.

ETXConstant 
public static const ETX:Char

The "end of test" unicode character.

exclamationPointConstant 
public static const exclamationPoint:Char

The "!" unicode character.

FFConstant 
public static const FF:Char

The "NP form feed, new page" unicode character.

FSConstant 
public static const FS:Char

The "file separator" unicode character.

graveAccentConstant 
public static const graveAccent:Char

The grave accent "`" character.

greaterThenConstant 
public static const greaterThen:Char

The greaterThen ">" unicode character.

GSConstant 
public static const GS:Char

The "group separator" unicode character.

lessThanConstant 
public static const lessThan:Char

The lessThan "<" unicode character.

LFConstant 
public static const LF:Char

The "NL line feed, new line" unicode character.

minusConstant 
public static const minus:Char

The minus (hyphen) unicode character.

NAKConstant 
public static const NAK:Char

The "negative acknowledge" unicode character.

NULConstant 
public static const NUL:Char

The "null" unicode character.

numberSignConstant 
public static const numberSign:Char

The "#" unicode character.

openingBraceConstant 
public static const openingBrace:Char

The opening brace "{" character.

openingBracketConstant 
public static const openingBracket:Char

The "" unicode character.

openingParenthesisConstant 
public static const openingParenthesis:Char

The "" unicode character.

percentConstant 
public static const percent:Char

The percent unicode character.

periodConstant 
public static const period:Char

The decimal point (period) unicode character.

pipeConstant 
public static const pipe:Char

The vertical line "|" character.

plusConstant 
public static const plus:Char

The plus unicode character.

questionMarkConstant 
public static const questionMark:Char

The questionMark "?" unicode character.

quotationMarksConstant 
public static const quotationMarks:Char

The "\" unicode character.

RSConstant 
public static const RS:Char

The "record separator" unicode character.

semiColonConstant 
public static const semiColon:Char

The semiColon ";" unicode character.

SIConstant 
public static const SI:Char

The "shift in" unicode character.

slashConstant 
public static const slash:Char

The slash (slant) unicode character.

SOConstant 
public static const SO:Char

The "shift out" unicode character.

SOHConstant 
public static const SOH:Char

The "start of heading" unicode character.

spaceConstant 
public static const space:Char

The "space" unicode character.

STXConstant 
public static const STX:Char

The "start of text" unicode character.

SUBConstant 
public static const SUB:Char

The "substitute" unicode character.

SYNConstant 
public static const SYN:Char

The "synchronous idle" unicode character.

TABConstant 
public static const TAB:Char

The "horizontal tab" unicode character.

tildeConstant 
public static const tilde:Char

The "-" overline, general accent character.

underlineConstant 
public static const underline:Char

The underline "_" character.

USConstant 
public static const US:Char

The "unit separator" unicode character.

VTConstant 
public static const VT:Char

The "vertical tab" unicode character.