String.EndsWith_

Syntax

EndsWith_(Source: String; SubStr: String): Boolean;

Parameters

Source. Source string.

SubStr. Search substring.

Description

The EndsWith_ method determines whether the end of source string contains search substring.

Comments

Available values:

Search for search substring in source string is case-sensitive. Spaces at the end of string and substring are ignored.

Example

Sub UserProc;
Var
    s1, s2: String;
    b: Boolean;
Begin
    s1 := 
"Calculator";
    s2 := 
"tor";
    
// Check if the end of source string contains substring
    b := String.EndsWith_(s1, s2);
    
Debug.WriteLine("EndsWith_("""  + s1 + "; " + s2 + """) = " + b.ToString);
End Sub UserProc

After executing the example it is determined whether the end of the Calculator string contains the tor substring, and the result is displayed in the console window.

See also:

String