Difference between revisions of "Explode"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function Explode(Separator, s: AnsiString): TStringArray; </source> ==Availability== SCAR Divi 3.20 > Current ==Description== ...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
− | function Explode(Separator, | + | function Explode(const Separator, Str: string): TStrArray; |
</source> | </source> | ||
Line 8: | Line 8: | ||
==Description== | ==Description== | ||
− | Splits a given [[ | + | Splits a given [[string]] '''Str''' into a [[TStrArray]] by breaking of at every substring given by '''Separator'''. An extended function with additional functionality is available as [[ExplodeEx]]. When '''Str''' is empty, the function will return an empty array. |
==Example== | ==Example== |
Latest revision as of 18:24, 18 October 2012
Definition
function Explode(const Separator, Str: string): TStrArray;
Availability
SCAR Divi 3.20 > Current
Description
Splits a given string Str into a TStrArray by breaking of at every substring given by Separator. An extended function with additional functionality is available as ExplodeEx. When Str is empty, the function will return an empty array.
Example
begin WriteLn(Implode(' ', Explode('roflcopter', 'HelloroflcopterWorld!'))); end.
Output:
Hello World!