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")}")
}Вывод
true false
pub(api) fn matches(s: str) -> boolС версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
s | str |
Возвращает
bool
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/text.oxl:1264