Substring.NextDelimitedText Method

function NextDelimitedText(const Delimiter: string): Boolean; overload;

The tokenizer: moves the window to the next field.

#NameDescription
1Delimiter

The text between fields, every text kind.

Returns: Boolean - False after the last field.

Examples

Counting fields.

uses Substr;

procedure Example;
var s: Substring;
    n: Integer;
begin
    s := Substring('x;y;z');
    n := 0;
    if s.FirstDelimitedText(';') then
        repeat
            Inc(n);
        until not s.NextDelimitedText(';');
    Assert(n = 3);
end;
See Also: Substring.FirstDelimitedText