Skip to content

TStringHelper.Join

Join a series of strings, separated using a given separator

Declaration

Source position: syshelph.inc line 85

public 
  class function Join(const Separator: string; 
                     const Values: Array of const) : string;  Overload
                     ;  Static;
  class function Join(const Separator: string; 
                     const Values: Array of string) : string;  Overload
                     ;  Static;
  class function Join(const Separator: string; 
                     const Values: Array of string; StartIndex: SizeInt; 
                     ACount: SizeInt) : string;  Overload;  Static;

Description

Join will return a string that consists of all the strings in Values concatenated, with Separator between them. Values can be an array of strings, but can also be an array of arbitrary values: the values will first be transformed to a string representation first.

In case an array of strings is passed on, a start index StartIndex and element count ACount can be passed on as well.

Errors

Classes, pointers or interfaces will not be transformed, but will result in a 'unknown type: NNN' string being inserted.

See also

Name Description
TStringHelper.Split Split a string in a number of parts