| Package | vegas.string |
| Class | public dynamic class Expression |
| Inheritance | Expression flash.utils.Dictionary |
| Subclasses | TypeExpression |
import vegas.string.Expression ;
var source:String ;
var exp:Expression = new Expression() ;
exp["root"] = "c:" ;
exp["system"] = "{root}/project/system" ;
exp["data.maps"] = "{system}/data/maps" ;
exp["data.maps.HashMap"] = "{data.maps}/HashMap.as" ;
source = "the root : {root} - the class : {data.maps.HashMap}" ;
trace( exp.format( source ) ) ;
trace( "----" ) ;
exp["system"] = "%root%/project/system" ;
exp["data.maps"] = "%system%/data/map" ;
exp["data.maps.HashMap"] = "%data.map%/HashMap.as" ;
exp.beginSeparator = "%" ;
exp.endSeparator = "%" ;
source = "the root : %root% - the class : %data.maps.HashMap%" ;
trace( exp.format( source ) ) ;
| Property | Defined by | ||
|---|---|---|---|
| beginSeparator : String
The begin separator of the expression to format (default "{").
| Expression | ||
| endSeparator : String
The end separator of the expression to format (default "}").
| Expression | ||
| MAX_RECURSION : uint = 200 [static]
The max recursion value.
| Expression | ||
| Method | Defined by | ||
|---|---|---|---|
|
Expression(weakKeys:Boolean = false)
Creates a new Expression instance.
| Expression | ||
|
format(value:* = null):String
Formats the specified value.
| Expression | ||
| beginSeparator | property |
beginSeparator:String [read-write]The begin separator of the expression to format (default "{").
Implementation public function get beginSeparator():String
public function set beginSeparator(value:String):void
| endSeparator | property |
endSeparator:String [read-write]The end separator of the expression to format (default "}").
Implementation public function get endSeparator():String
public function set endSeparator(value:String):void
| MAX_RECURSION | property |
public static var MAX_RECURSION:uint = 200The max recursion value.
| Expression | () | constructor |
public function Expression(weakKeys:Boolean = false)Creates a new Expression instance.
ParametersweakKeys:Boolean (default = false) — Instructs the Dictionary object to use "weak" references on object keys. If the only reference to an object is in the specified Dictionary object, the key is eligible for garbage collection and is removed from the table when the object is collected.
|
| format | () | method |
public function format(value:* = null):StringFormats the specified value.
Parametersvalue:* (default = null) |
String — the string representation of the formatted value.
|