ITextReader.WordDelimiters

Syntax

WordDelimiters: String;

Description

The WordDelimiters property determines a delimiter between words while reading a text file. A space is used as a default delimiter.

Example

Sub UserProc;
Var
    File1: IFileInfo;
    TextR: ITextReader;
    s: String;
Begin
    File1:=New FileInfo.Attach("c:\New_folder\1.txt");
    If File1.Exists Then
        TextR.WordDelimiters:="_";
        s:=TextR.ReadWord;

    End If;
    Dispose File1;
End Sub UserProc;

After executing the example the "s" variable contains the first word read from the 1.txt file. A character "_" is used as a delimiter.

See also:

ITextReader