String.Length

Syntax

Length: Integer;

Description

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

Example

Sub UserProc;
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 UserProc;

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

See also:

String