TStringHelper.Split
Split a string in a number of parts
Declaration
Source position: syshelph.inc line 154
public
function Split(const Separators: Array of Char) : TStringArray
; Overload;
function Split(const Separators: Array of Char; ACount: SizeInt)
: TStringArray; Overload;
function Split(const Separators: Array of Char;
Options: TStringSplitOptions) : TStringArray; Overload;
function Split(const Separators: Array of Char; ACount: SizeInt;
Options: TStringSplitOptions) : TStringArray; Overload;
function Split(const Separators: Array of string) : TStringArray
; Overload;
function Split(const Separators: Array of string; ACount: SizeInt)
: TStringArray; Overload;
function Split(const Separators: Array of string;
Options: TStringSplitOptions) : TStringArray; Overload;
function Split(const Separators: Array of string; ACount: SizeInt;
Options: TStringSplitOptions) : TStringArray; Overload;
function Split(const Separators: Array of Char; AQuote: Char)
: TStringArray; Overload;
function Split(const Separators: Array of Char; AQuoteStart: Char;
AQuoteEnd: Char) : TStringArray; Overload;
function Split(const Separators: Array of Char; AQuoteStart: Char;
AQuoteEnd: Char; Options: TStringSplitOptions)
: TStringArray; Overload;
function Split(const Separators: Array of Char; AQuoteStart: Char;
AQuoteEnd: Char; ACount: SizeInt) : TStringArray
; Overload;
function Split(const Separators: Array of Char; AQuoteStart: Char;
AQuoteEnd: Char; ACount: SizeInt;
Options: TStringSplitOptions) : TStringArray; Overload;
function Split(const Separators: Array of string; AQuote: Char)
: TStringArray; Overload;
function Split(const Separators: Array of string; AQuoteStart: Char;
AQuoteEnd: Char) : TStringArray; Overload;
function Split(const Separators: Array of string; AQuoteStart: Char;
AQuoteEnd: Char; Options: TStringSplitOptions)
: TStringArray; Overload;
function Split(const Separators: Array of string; AQuoteStart: Char;
AQuoteEnd: Char; ACount: SizeInt) : TStringArray
; Overload;
function Split(const Separators: Array of string; AQuoteStart: Char;
AQuoteEnd: Char; ACount: SizeInt;
Options: TStringSplitOptions) : TStringArray; Overload;
Description
Split will split the string (Self) using Separators as separator characters.
If ACount is supplied, then at most ACount strings will be included in the result. The default behaviour is to supply all strings.
if Options contains ExcludeEmpty then no empty strings will be included in the result. Empty strings may be included if multiple successive separator characters are found in the source string, but not for the last character: If the last characters is a separator string, the 'empty string' behind it is not added to the result.
If AQuoteStart and AQuoteEnd are supplied, then no splitting will be performed between AQuoteStart and AQuoteEnd characters.
See also
Name | Description |
---|---|
TStringHelper.IndexOfAny | Find the position (index) of any string or character in a list. |
TStringHelper.IndexOfAnyUnquoted | Find the position (index) of any string or character in a list. |
TStringHelper.Join | Join a series of strings, separated using a given separator |