OxL Reference

method char.isDigit

The character in lower case.

Example:

oxl✓ checked in CI
fn main() io {
  print("{'A'.toLower()}")
}
Output
a

The character in upper case.

Example:

oxl✓ checked in CI
fn main() io {
  print("{'a'.toUpper()}")
}
Output
A

True for a whitespace character.

Example:

oxl✓ checked in CI
fn main() io {
  print("{' '.isWhitespace()}")
}
Output
true

True for a letter.

Example:

oxl✓ checked in CI
fn main() io {
  print("{'x'.isAlpha()} {'7'.isAlpha()}")
}
Output
true false

True for a decimal digit.

Example:

oxl✓ checked in CI
fn main() io {
  print("{'7'.isDigit()} {'x'.isDigit()}")
}
Output
true false
pub(api) fn isDigit() -> bool

Since. 1.0.0-beta

Returns

bool

Effects

none declared (pure unless the body says otherwise)

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

See also