function ContainsAscii(const Value: string; const IgnoreCase: Boolean): Boolean; overload;
Whether the text contains Value, ignoring case when IgnoreCase is True for A to Z only: A to Z and a to z match each other, every other character only itself; ordinal when it is False.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | string | |
| 2 | IgnoreCase | Boolean |
Returns: Boolean
Remarks:
Every text kind.
Note: This routine handles only ANSI/ASCII case char mapping and does not handle locale specific char handling, but it is 6.3 to 51 times faster than its ContainsLinguistic alternative.
Examples
A part in another case.
uses Substr;
procedure Example;
begin
Assert(Substring('Hello').ContainsAscii('ELL', True));
Assert(not Substring('Hello').ContainsAscii('ELL', False));
end;