OxL Справочник OxL
РусскийEnglish

method Regex.matches

True when the whole of s matches the pattern.

Example:

oxl✓ проверяется в CI
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

Параметры

ИмяТип
sstr

Возвращает

bool

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/text.oxl:1264

См. также