Length_(Source: String): Integer;
Source. String.
The Length method returns the number of characters in the specified string.
To get the specified number of string characters use the String.Left and String.Right methods.
Sub UserProc;
Var
s1: String;
i: Integer;
Begin
s1 := "Calculator";
// Get the number of characters
i := String.Length_(s1);
Debug.WriteLine("Length_(""" + s1 + """) = " + i.ToString);
End Sub UserProc;
After executing the example the number of characters in the Calculator string is displayed in the console window.
See also: