String.EndsWith

Syntax

EndsWith(Value: String): Boolean;

Parameters

Value. Checked sequence of characters.

Description

The EndsWith method checks if the current string ends with the specified character sequence passed as the Value parameter.

Comments

The method returns True if the string ends with the specified sequence, otherwise it returns False.

Example

Sub UserProc;
Var
    s: String;
    b, b1: Boolean;
Begin
    s := "abcdefg";
    b := s.EndsWith("f");
    b1 := s.EndsWith("g");
End Sub UserProc;

After executing the example the "b" and "b1" variables contain the values False and True respectively because the current string ends with the "g" character.

See also:

String