method str.isEmpty
Whether there are no bytes.
Example:
fn main() io {
print("{b"".isEmpty()} {b"a".isEmpty()}")
}Вывод
true false
Whether the text has no characters.
Example:
fn main() io {
print("{"".isEmpty()} {"a".isEmpty()}")
}Вывод
true false
True for the empty string.
Example:
fn main() io {
print("{"".isEmpty()} {"a".isEmpty()}")
}Вывод
true false
pub(api) fn isEmpty() -> boolСложность. O(1).
С версии. 1.0.0-beta
Возвращает
bool
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/text.oxl:87