System.SysUtils.TStringHelper.EndsWith
Delphi
function EndsWith(const Value: string): Boolean; overload; inline;
function EndsWith(const Value: string; IgnoreCase: Boolean): Boolean; overload;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.SysUtils.pas | System.SysUtils | TStringHelper |
説明
この文字列が、指定されたサブ文字列 Value
で終わるかどうかを返します。
EndsWith は、この文字列が、Value
で渡されたサブ文字列で終わるかどうかを返します。EndsWith は、第1オーバーロード関数が使用された場合には、大文字小文字を区別します。
IgnoreCase
は、大文字小文字を区別するかどうかを指定します。
var
MyString: String;
begin
MyString := 'This is a string.';
Writeln(Boolean(MyString.EndsWith('String.', False)));
end.
出力は以下のとおりです。
FALSE