Right(Source: String; Count: Integer): String;
Source. String.
Count. Number of characters from the right edge of string.
The Right method returns the specified number of characters from the right edge of string.
To get characters from the left edge of string, use the String.Left method.
Sub UserProc;
Var
s1, s2: String;
i: Integer;
Begin
s1 := "Calculator";
i := 4;
// Get string characters
s2 := String.Right(s1, i);
Debug.WriteLine("Right(""" + s1 + "; " + i.ToString + """) = " + s2);
End Sub UserProc;
After executing the example first four characters from the right edge of the Calculator string are displayed in the console window.
See also: