Field-Map Scripting

4.1.2.12 IndexOfField

IndexOfField function


Prototype:

function IndexOfField(const Data, Field : string; const FieldDelimiter :char) :integer

Description:

Returns an index of  specified field from input string. Indices are counted from 0. The fields in the string are separated by given parameter FieldDelimiter.

Syntax:

IndexOfField(Data, Field, FieldDelimiter);


Part

Description


Data

source string containing several fields


Field

the field whose index we want to find out


FieldDelimiter

a character used to delimit the fields in the input string

Return value:

Integer value that represents index of the specified field from the input string


Example:

Begin
  ShowWarning('Measurement canceled');
End.


See also:

Format; LZero; Delete; Trim; TrimLeft; TrimRight; SameText; StringReplace; DeFormat1-10; GetFieldCountFromString;GetFieldFromString; IndexOfField; SortNumericSequence