System.SysUtils.TStringHelper.EndsWith

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function EndsWith(const Value: string): Boolean; overload; inline;
function EndsWith(const Value: string; IgnoreCase: Boolean): Boolean; overload;

Properties

Type Visibility Source Unit Parent
function public System.SysUtils.pas System.SysUtils TStringHelper

Description

Returns whether this string ends with the given Value substring.

EndsWith returns whether this string ends with the substring passed through Value. EndsWith is case-sensitive if the first overloaded function is used.

IgnoreCase specifies whether to use case-sensitivity or not.

var
  MyString: String;

begin
  MyString := 'This is a string.';
  Writeln(Boolean(MyString.EndsWith('String.', False)));
end.

Output:

FALSE

See Also