System.SysUtils.TStringHelper.EndsText

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function EndsText(const ASubText, AText: string): Boolean; static;

Properties

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

Description

Returns whether the given 0-based string ends with the given 0-based substring.

EndsText is a static function that can be called like this:

var
  MyString: String;

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

Output:

TRUE

Tip: EndsText is case-insensitive.

See Also