method Regex.matches
True when the whole of s matches the pattern.
Example:
fn main() io {
let re = Regex.compile("[0-9]+")!
print("{re.matches("123")} {re.matches("12a")}")
}Output
true false
pub(api) fn matches(s: str) -> boolSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
s | str |
Returns
bool
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/text.oxl:1264