| Package | org.springextensions.actionscript.collections |
| SVN browsing | PropertiesParser.as |
| Fisheye | PropertiesParser.as |
| Class | public class PropertiesParser |
PropertiesParser parses a properties source string into a Properties
instance.
The source string contains simple key-value pairs. Multiple pairs are separated by line terminators (\n or \r or \r\n). Keys are separated from values with the characters '=', ':' or a white space character.
Comments are also supported. Just add a '#' or '!' character at the beginning of your comment-line.
If you want to use any of the special characters in your key or value you must escape it with a back-slash character '\'.
The key contains all of the characters in a line starting from the first non-white space character up to, but not including, the first unescaped key-value-separator.
The value contains all of the characters in a line starting from the first non-white space character after the key-value-separator up to the end of the line. You may of course also escape the line terminator and create a value across multiple lines.
See also
| Method | Defined by | ||
|---|---|---|---|
|
Constructs a new
PropertiesParser instance. | PropertiesParser | ||
|
parseProperties(source:String):Properties
Parses the given
source and creates a Properties instance from it. | PropertiesParser | ||
| Method | Defined by | ||
|---|---|---|---|
|
getSeparation(line:String):int
Returns the position at which key and value are separated.
| PropertiesParser | ||
| PropertiesParser | () | constructor |
public function PropertiesParser()
Constructs a new PropertiesParser instance.
| getSeparation | () | method |
protected function getSeparation(line:String):intReturns the position at which key and value are separated.
Parametersline:String — the line that contains the key-value pair
|
int — the position at which key and value are separated
|
| parseProperties | () | method |
public function parseProperties(source:String):Properties
Parses the given source and creates a Properties instance from it.
source:String — the source to parse
|
Properties —
the properties defined by the given source
|