String.SubString

Syntax

SubString(Start: Integer; [Count: Integer = -1]): String;

Parameters

Start. Index of the initial substring character in the string.

Count. The number of characters in the substring.

Description

The SubString method returns a substring from the current string.

Comments

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.

Example

Sub Main;
Var
    s, s1: String;
Begin
    s := "abcdefg";
    s1 := s.SubString(32);
End Sub Main;

After executing the example the "s1" variable will contain the "de" substring.

See also:

String