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

method str.endsWith

Whether the text ends with suffix.

Example:

oxl✓ проверяется в CI
fn main() io {
  print("{"hello".endsWith("lo")} {"hello".endsWith("he")}")
}
Вывод
true false

True when the string ends with suffix.

Example:

oxl✓ проверяется в CI
fn main() io {
  print("{"main.oxl".endsWith(".oxl")}")
}
Вывод
true
pub(api) fn endsWith(suffix: str) -> bool

Сложность. O(len(suffix)).

С версии. 1.0.0-beta

Параметры

ИмяТип
suffixstr

Возвращает

bool

Эффекты

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

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

См. также