SubString(Start: Integer; [Count: Integer = -1]): String;
Start. Index of the initial substring character in the string.
Count. The number of characters in the substring.
The SubString method returns a substring from the current string.
If the Count parameter is not set, the method returns substring beginning with the character with the Start index and finishing with the last character in the string.
Sub Main;
Var
s, s1: String;
Begin
s := "abcdefg";
s1 := s.SubString(3, 2);
End Sub Main;
After executing the example the "s1" variable will contain the "de" substring.
See also: