function EndsWithInvariant(const Value: string; const IgnoreCase: Boolean): Boolean; overload;
Whether the text ends with Value by UTF-16 code unit; IgnoreCase True ignores case by the operating system's uppercase table, the same under every locale.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | string | |
| 2 | IgnoreCase | Boolean |
Returns: Boolean
Remarks:
Every text kind.
Note: This routine is 2.3 to 42 times slower than EndsWithAscii due to the operating system's case table. Use EndsWithAscii, if A to Z is enough.
Examples
Accented letters in either case.
uses Substr;
procedure Example;
begin
Assert(Substring('noir CAF'#$C9).EndsWithInvariant('caf'#$E9, True));
end;