IStringList.ItemLength

Syntax

ItemLength(Index: Integer): Integer;

Parameters

Index. Array element index.

Description

The ItemLength property returns array element length.

Example

Sub Main;

Var

StrL: IStringList;

i: Integer;

Begin

StrL:=New StringList.Create;

For i:=0 To Math.RandBetweenI(50,100) Do

StrL.Add("Number "+Math.RandBetweenI(0,100).ToString);

End For;

i:=StrL.ItemLength(Math.RandBetweenI(50,StrL.Count));

End Sub Main;

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

See also:

IStringList