parseProperties

This function takes a string of text and attempts to interpret it using the following set of rules...

1. Blank lines are ignored. 2. Lines that start (after the removal of leading whitespace) with a '#' are ignored. 3. All other lines will first be stripped of leading and trailing whitespace then searched for a '=' and, if that is not found, a ':'. If neither of these is found an exception is thrown. If one of them is found then the line is split around the first occurrence with the part of the left hand side becoming a key and the part on the right hand side become a value in the associative array generated.

string[string]
parseProperties
(
string input
)

Parameters

input
Type: string

The string containing the text to be parsed.

Return Value

Type: string[string]

An associative array of strings indexed by strings.

Meta