SplitString splits a string S based on the aChar character, and returns the item given by aIndex.
aIndex is a 1-based array - an index value of 1 returns the first split item.
If the string does not contain aChar, the aIndex value has to be one (1) so that the whole string is returned as the first split item.
If the string does not contain aChar, and the aIndex value is not one (1), then the returned string will be empty.
Declaration: Function SplitString( const S : string; aIndex : integer; aChar : Char) : string
Examples follow.