System.SysUtils.TStringHelper.EndsWith

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

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

Propriétés

Type Visibilité  Source Unité  Parent
function public System.SysUtils.pas System.SysUtils TStringHelper


Description

Renvoie si cette chaîne de base 0 se termine par la sous-chaîne Value donnée.

EndsWith renvoie si cette chaîne se termine par la sous-chaîne transmise par Value. EndsWith est sensible à la casse si la première fonction surchargée est utilisée.

IgnoreCase spécifie s'il faut utiliser le respect de la casse.

var
  MyString: String;

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

Sortie :


FALSE

Voir aussi