[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sysutils' (#rtl)

TStringHelper.Split

Split a string in a number of parts

Declaration

Source position: syshelph.inc line 154

public function TStringHelper.Split(

  const Separators: array of Char

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of Char;

  ACount: SizeInt

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of Char;

  Options: TStringSplitOptions

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of Char;

  ACount: SizeInt;

  Options: TStringSplitOptions

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of string

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of string;

  ACount: SizeInt

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of string;

  Options: TStringSplitOptions

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of string;

  ACount: SizeInt;

  Options: TStringSplitOptions

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of Char;

  AQuote: Char

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of Char;

  AQuoteStart: Char;

  AQuoteEnd: Char

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of Char;

  AQuoteStart: Char;

  AQuoteEnd: Char;

  Options: TStringSplitOptions

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of Char;

  AQuoteStart: Char;

  AQuoteEnd: Char;

  ACount: SizeInt

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of Char;

  AQuoteStart: Char;

  AQuoteEnd: Char;

  ACount: SizeInt;

  Options: TStringSplitOptions

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of string;

  AQuote: Char

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of string;

  AQuoteStart: Char;

  AQuoteEnd: Char

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of string;

  AQuoteStart: Char;

  AQuoteEnd: Char;

  Options: TStringSplitOptions

):TStringArray; overload;

function TStringHelper.Split(

  const Separators: array of string;

  AQuoteStart: Char;

  AQuoteEnd: Char;

  ACount: SizeInt

):TStringArray; overload;

function TStringHelper.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

TStringHelper.Join

  

Join a series of strings, separated using a given separator

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.


Documentation generated on: Jun 23 2021