String.Length

Syntax

Length: Integer;

Description

The Length property returns the length of the character string in the variable.

Example

Sub Main;

Var

s, s1, s2: String;

L, L1, L2: Integer;

Begin

s := "";

s1 := "ab cd";

s2 := "abcdefgkl";

L := s.Length;

L1 := s1.Length;

L2 := s2.Length;

End Sub Main;

After executing the example the variables "L", "L1" and "L2" will have the values "0", "5" and "9" respectively.

See also:

String