Icon Split

Unit: Internal

Available In: Client and Server Applications

function Split(const Value: String; const Separator: String): array of String

function Split(const Value: String; const Separator: String;
               MaxLength: Integer): array of String

The Split function builds a new string array by splitting the Value input parameter using the Separator input parameter. The optional MaxLength input parameter specifies the maximum length of the string array. The return value is an array of String values that does not include the specified Separator string.

Examples

X := Split('Hello, my name is Jim', ' ');  // X is ['Hello,','my','name','is','Jim']
Image