IStringList.ItemLength

Syntax

ItemLength(Index: Integer): Integer;

Parameters

Index. Array element index.

Description

The ItemLength property returns array element length.

Example

Sub UserProc;
Var
    StrL: IStringList;
    i: Integer;
Begin
    StrL := New StringList.Create;
    For i := 0 To Math.RandBetweenI(50100Do
        StrL.Add("Number " + Math.RandBetweenI(0100).ToString);
    End For;
    i := StrL.ItemLength(Math.RandBetweenI(50, StrL.Count));
End Sub UserProc;

After executing the example a dynamic array of strings is generated. The "i" variable contains the length of array random element.

See also:

IStringList