method char.isDigit
The character in lower case.
Example:
fn main() io {
print("{'A'.toLower()}")
}Output
a
The character in upper case.
Example:
fn main() io {
print("{'a'.toUpper()}")
}Output
A
True for a whitespace character.
Example:
fn main() io {
print("{' '.isWhitespace()}")
}Output
true
True for a letter.
Example:
fn main() io {
print("{'x'.isAlpha()} {'7'.isAlpha()}")
}Output
true false
True for a decimal digit.
Example:
fn main() io {
print("{'7'.isDigit()} {'x'.isDigit()}")
}Output
true false
pub(api) fn isDigit() -> boolSince. 1.0.0-beta
Returns
bool
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/text.oxl:868