Appearance
Like Method
Definition
- Namespace:
JASE.Extensions - Assembly:
JASE.Primitives.dll
bool Like(string input, string match, bool caseInsensitive = null)
csharp
bool Like(string input, string match, bool caseInsensitive = null)Performs a SQL-like pattern match on the current string.
Parameters
| Name | Description |
|---|---|
caseInsensitive | If , comparison is performed using case-insensitive, culture-invariant matching. Defaults to . |
input | The input string to test against the pattern. If , the method returns . |
match | The pattern to match against. Supports % or * for multi-character wildcards, _ for a single-character wildcard, and character classes using square brackets (for example, [abc] or [a-z]). Use [^...] to negate a character class. A backslash (\) escapes the next character in the pattern. |
Returns
if input matches the given pattern; otherwise, .
Remarks
This method implements a subset of SQL LIKE-style semantics with additional support for character ranges in square brackets. It is intended for in-memory pattern checks, not for use as a security boundary.
The method returns if either the pattern or the input string is .