OxL Reference

method str.isEmpty

Whether there are no bytes.

Example:

oxl✓ checked in CI
fn main() io {
  print("{b"".isEmpty()} {b"a".isEmpty()}")
}
Output
true false

Whether the text has no characters.

Example:

oxl✓ checked in CI
fn main() io {
  print("{"".isEmpty()} {"a".isEmpty()}")
}
Output
true false

True for the empty string.

Example:

oxl✓ checked in CI
fn main() io {
  print("{"".isEmpty()} {"a".isEmpty()}")
}
Output
true false
pub(api) fn isEmpty() -> bool

Complexity. O(1).

Since. 1.0.0-beta

Returns

bool

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/text.oxl:87

See also