method str.endsWith
Whether the text ends with suffix.
Example:
fn main() io {
print("{"hello".endsWith("lo")} {"hello".endsWith("he")}")
}Вывод
true false
True when the string ends with suffix.
Example:
fn main() io {
print("{"main.oxl".endsWith(".oxl")}")
}Вывод
true
pub(api) fn endsWith(suffix: str) -> boolСложность. O(len(suffix)).
С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
suffix | str |
Возвращает
bool
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/text.oxl:216