Pascal Scripting: StringSplit

Prototype:

function StringSplit(const S: String; const Separators: TArrayOfString; const Typ: TSplitType): TArrayOfString;

Description:

Splits the given string into substrings, using the given characters or strings to be used as separator. Empty substrings can be ignored.

TSplitType is defined as:

TSplitType = (stAll, stExcludeEmpty, stExcludeLastEmpty);

Example:
var
  A: array of String;
begin
  A := StringSplit('1,,2', [','], stExcludeEmpty);
  // A = ['1','2']
end;
See also:

StringJoin
StringSplitEx