matches
Says whether text matches a pattern, with the rule of `subset_like`: the pattern is matched against the whole text, without regard to case, and `*` is the only wildcard (it stands for any text, including none). A null text or pattern matches nothing.
Runs on: either side: the compiler places the statement that calls it where the values it uses live.
Format:
matches(text, pattern)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| text | string | the text |
| pattern | string | the pattern, with `*` as the wildcard |
Returned Value:
| Type | Description |
|---|---|
| bool | true when the whole text matches |
Examples
if (matches(email, "*@*.*")) { ... }