Packagevegas.string
Classpublic dynamic class UnicodeChar
InheritanceUnicodeChar Inheritance flash.utils.Proxy

ECMA 262 Unicode IFormat-Control Characters tools.

See ECMAScript 262 specifications


Example
     UnicodeChar = vegas.string.UnicodeChar ;
     
     trace("-----") ;
     
     trace("Number of white space characters : " + UnicodeChar.WHITE_SPACE_CHARS.length) ;
     
     trace("-----") ;
     
     trace( "|" + UnicodeChar.TAB + "hello world" ) ;
     
     trace("-----") ;
     
     trace ("isWhiteSpace UnicodeChar.TAB : " + UnicodeChar.isWhiteSpace( UnicodeChar.TAB ) ) ;
     
     trace("-----") ;
     
     trace("UnicodeChar.toChar('0040') : " + UnicodeChar.toChar("0040")) ;
     
     trace("UnicodeChar.toUnicode('220')  : " + UnicodeChar.toUnicode(220)) ;
     trace("UnicodeChar.toChar(UnicodeChar.toUnicode('220')) : " + UnicodeChar.toChar(UnicodeChar.toUnicode(220))) ;
     
     trace("-----") ;
     
     u = new UnicodeChar() ;
     trace( u.u5c0f() + u.u98fc() + u.u5f3e() + u.u0040() ) ; // 小飼弾



Public Methods
 MethodDefined by
  
Creates a new UnicodeChar instance.
UnicodeChar
  
isLineTerminators(char:String):Boolean
[static] Returns true of the specified character is a line terminator.
UnicodeChar
  
isWhiteSpace(char:String):Boolean
[static] Returns true of the specified character is a whitespace.
UnicodeChar
  
toChar(unicode:String):Char
[static] Converts a unicode representation and returns this char's string.
UnicodeChar
  
toCharString(unicode:String):String
[static] Converts a unicode representation and returns this char's string.
UnicodeChar
  
toUnicode(n:Number):String
[static] Converts an unicode number value and returns this string representation.
UnicodeChar
Protected Methods
 MethodDefined by
  
callProperty(methodName:*, ... rest):*
Overrides the behavior of an object property that can be called as a function.
UnicodeChar
Public Constants
 ConstantDefined by
  BACK_SLASH : String
[static] Back Slash utf8 representation (special char).
UnicodeChar
  BACK_SPACE : String
[static] Back Space utf8 representation (special char).
UnicodeChar
  CR : String
[static] Carriage Return utf8 representation (line terminators).
UnicodeChar
  DOUBLE_QUOTE : String
[static] Double Quote utf8 representation (special char).
UnicodeChar
  FF : String
[static] Form Feed utf8 representation (whitespace).
UnicodeChar
  LF : String
[static] Line Feed utf8 representation (line terminators).
UnicodeChar
  LINE_TERMINATOR_CHARS : Array
[static] Array with all line terminators characters
UnicodeChar
  LS : String
[static] Line Separator utf8 representation (line terminators).
UnicodeChar
  NBSP : String
[static] No-break space utf8 representation (whitespace).
UnicodeChar
  PS : String
[static] Paragraph Separator utf8 representation (line terminators).
UnicodeChar
  SIMPLE_QUOTE : String
[static] Simple Quote utf8 representation (special char).
UnicodeChar
  SP : String
[static] Space utf8 representation (whitespace).
UnicodeChar
  SPECIAL_CHARS : Array
[static] Array with all whitespace characters.
UnicodeChar
  TAB : String
[static] Tab utf8 representation (whitespace).
UnicodeChar
  VT : String
[static] Vertical Tab utf8 representation (whitespace).
UnicodeChar
  WHITE_SPACE_CHARS : Array
[static] Array with all whitespace characters.
UnicodeChar
Constructor detail
UnicodeChar()constructor
public function UnicodeChar()

Creates a new UnicodeChar instance.


Example
      var u:UnicodeChar = new UnicodeChar() ;
      trace( u.u0040() ) ; // 

Method detail
callProperty()method
flash_proxy override function callProperty(methodName:*, ... rest):*

Overrides the behavior of an object property that can be called as a function. When a method of the object is invoked, this method is called. While some objects can be called as functions, some object properties can also be called as functions.

Parameters
methodName:*
 
... rest

Returns
*
isLineTerminators()method 
public static function isLineTerminators(char:String):Boolean

Returns true of the specified character is a line terminator.

Parameters
char:String

Returns
Booleantrue of the specified character is a line terminator.
isWhiteSpace()method 
public static function isWhiteSpace(char:String):Boolean

Returns true of the specified character is a whitespace.

Parameters
char:String

Returns
Booleantrue of the specified character is a whitespace.
toChar()method 
public static function toChar(unicode:String):Char

Converts a unicode representation and returns this char's string.

Parameters
unicode:String

Returns
Char — The char of the unicode representation.
toCharString()method 
public static function toCharString(unicode:String):String

Converts a unicode representation and returns this char's string.

Parameters
unicode:String

Returns
String — The char of the unicode representation.
toUnicode()method 
public static function toUnicode(n:Number):String

Converts an unicode number value and returns this string representation.

Parameters
n:Number

Returns
String — The string representation of a unicode number.
Constant detail
BACK_SLASHconstant
public static const BACK_SLASH:String

Back Slash utf8 representation (special char).

BACK_SPACEconstant 
public static const BACK_SPACE:String

Back Space utf8 representation (special char).

CRconstant 
public static const CR:String

Carriage Return utf8 representation (line terminators).

DOUBLE_QUOTEconstant 
public static const DOUBLE_QUOTE:String

Double Quote utf8 representation (special char).

FFconstant 
public static const FF:String

Form Feed utf8 representation (whitespace).

LFconstant 
public static const LF:String

Line Feed utf8 representation (line terminators).

LINE_TERMINATOR_CHARSconstant 
public static const LINE_TERMINATOR_CHARS:Array

Array with all line terminators characters

LSconstant 
public static const LS:String

Line Separator utf8 representation (line terminators).

NBSPconstant 
public static const NBSP:String

No-break space utf8 representation (whitespace).

PSconstant 
public static const PS:String

Paragraph Separator utf8 representation (line terminators).

SIMPLE_QUOTEconstant 
public static const SIMPLE_QUOTE:String

Simple Quote utf8 representation (special char).

SPconstant 
public static const SP:String

Space utf8 representation (whitespace).

SPECIAL_CHARSconstant 
public static const SPECIAL_CHARS:Array

Array with all whitespace characters. NB : USP no implement (Any other Unicode "space separator")

TABconstant 
public static const TAB:String

Tab utf8 representation (whitespace).

VTconstant 
public static const VT:String

Vertical Tab utf8 representation (whitespace).

WHITE_SPACE_CHARSconstant 
public static const WHITE_SPACE_CHARS:Array

Array with all whitespace characters. NB : USP no implement (Any other Unicode "space separator")