String.EndsWith

Syntax

EndsWith(Value: String): Boolean;

Parameters

Value - checked character sequence.

Description

The EndsWith method checks if the current string ends with the specified character sequence passed as the Value parameter. The method returns True if the string ends with the specified sequence, otherwise it returns False.

Example

Sub Main;

Var

s: String;

b, b1: Boolean;

Begin

s := "abcdefg";

b := s.EndsWith("f");

b1 := s.EndsWith("g");

End Sub Main;

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

See also:

String