| Unit: | SDL_stringl |
| Class: |
none |
| Declaration: |
function ExtractSubString (const Instring: string; const occ: integer; const Separator: string): string;
|
The function ExtractSubString returns the substring between the occth and the (occ+1)th occurrence of the separator (without separators). The separator is specified by the parameter Separator. If occ is greater or equal to the number of separators contained in InString, an empty string is returned.
| Example: |
Given that the variable astr contains the string 'Part1:Part Two: Part Three:Last Part' the expression ExtractSubString (astr, 1, ':'); returns 'Part Two' as substring.
|
|