Substring.ContainsLinguistic Method

Overload List

#SignatureDescription
1function ContainsLinguistic(const Value: string; const IgnoreCase: Boolean): Boolean; overload;Whether the text contains Value by the rules of the default locale or of LocaleID; IgnoreCase True ignores case.
2function ContainsLinguistic(const Value: string; const IgnoreCase: Boolean; const LocaleID: TLocaleID): Boolean; overload;

Overload 1: function ContainsLinguistic(const Value: string; const IgnoreCase: Boolean): Boolean; overload;

Whether the text contains Value by the rules of the default locale or of LocaleID; IgnoreCase True ignores case.

#NameTypeDescription
1Valuestring
2IgnoreCaseBoolean

Returns: Boolean

Remarks:

Every text kind. A Value of only ignorable characters, such as a soft hyphen, is never found, as an empty one is not.
Note: This routine is 6.3 to 51 times slower than ContainsAscii, and 10 to 62 times slower than Contains, due to handling of the locale specific char handling. Use ContainsAscii or Contains, if this handling is not needed.

Examples

A soft hyphen in the text is ignored.

uses Substr;

procedure Example;
begin
    Assert(Substring('STRA'#$AD'SSE').ContainsLinguistic('strasse', True));
end;
See Also: Substring.ContainsAscii, Substring.ContainsInvariant

Overload 2: function ContainsLinguistic(const Value: string; const IgnoreCase: Boolean; const LocaleID: TLocaleID): Boolean; overload;

#NameTypeDescription
1Valuestring
2IgnoreCaseBoolean
3LocaleIDTLocaleID

Returns: Boolean