| Package | vegas.strings |
| Class | public dynamic class UnicodeChar |
| Inheritance | UnicodeChar flash.utils.Proxy |
See ECMAScript 262 specifications
| Method | Defined 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 | ||
[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 | ||
| Method | Defined By | ||
|---|---|---|---|
callProperty(methodName:*, ... rest):* [override]
Overrides the behavior of an object property that can be called as a function. | UnicodeChar | ||
| Constant | Defined 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 | ||
| UnicodeChar | () | Constructor |
public function UnicodeChar()
Creates a new UnicodeChar instance.
Example :
var u:UnicodeChar = new UnicodeChar() ;
trace( u.u0040() ) ; // @
| callProperty | () | method |
override flash_proxy 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 |
* |
| isLineTerminators | () | method |
public static function isLineTerminators(char:String):Boolean
Returns true of the specified character is a line terminator.
Parameters
char:String |
Boolean — true 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 |
Boolean — true of the specified character is a whitespace.
|
| toChar | () | method |
public static function toChar(unicode:String):CharConverts a unicode representation and returns this char's string.
Parameters
unicode:String |
Char — The char of the unicode representation.
|
| toCharString | () | method |
public static function toCharString(unicode:String):StringConverts a unicode representation and returns this char's string.
Parameters
unicode:String |
String — The char of the unicode representation.
|
| toUnicode | () | method |
public static function toUnicode(n:Number):StringConverts an unicode number value and returns this string representation.
Parameters
n:Number |
String — The string representation of a unicode number.
|
| BACK_SLASH | Constant |
public static const BACK_SLASH:StringBack Slash utf8 representation (special char).
| BACK_SPACE | Constant |
public static const BACK_SPACE:StringBack Space utf8 representation (special char).
| CR | Constant |
public static const CR:StringCarriage Return utf8 representation (line terminators).
| DOUBLE_QUOTE | Constant |
public static const DOUBLE_QUOTE:StringDouble Quote utf8 representation (special char).
| FF | Constant |
public static const FF:StringForm Feed utf8 representation (whitespace).
| LF | Constant |
public static const LF:StringLine Feed utf8 representation (line terminators).
| LINE_TERMINATOR_CHARS | Constant |
public static const LINE_TERMINATOR_CHARS:ArrayArray with all line terminators characters
| LS | Constant |
public static const LS:StringLine Separator utf8 representation (line terminators).
| NBSP | Constant |
public static const NBSP:StringNo-break space utf8 representation (whitespace).
| PS | Constant |
public static const PS:StringParagraph Separator utf8 representation (line terminators).
| SIMPLE_QUOTE | Constant |
public static const SIMPLE_QUOTE:StringSimple Quote utf8 representation (special char).
| SP | Constant |
public static const SP:StringSpace utf8 representation (whitespace).
| SPECIAL_CHARS | Constant |
public static const SPECIAL_CHARS:ArrayArray with all whitespace characters. NB : USP no implement (Any other Unicode "space separator")
| TAB | Constant |
public static const TAB:StringTab utf8 representation (whitespace).
| VT | Constant |
public static const VT:StringVertical Tab utf8 representation (whitespace).
| WHITE_SPACE_CHARS | Constant |
public static const WHITE_SPACE_CHARS:ArrayArray with all whitespace characters. NB : USP no implement (Any other Unicode "space separator")
import vegas.strings.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() ) ;