HomeManualTopicsTypesSymbols

std::is_a_digit

checks wheter its argument is a digit

Parameter

chr
the character to check

Result

success
true if the argument is a digit

Description

This function must be called on character-values only.

Example

if is_a_digit('3'): println! "3 is a digit" : println! "3 is not a digit"

Output

3 is a digit

Example

if is_a_digit('a'): println! "a is a digit" : println! "a is not a digit"

Output

a is not a digit

Topic

Strings

See also

std_types::character a unicode code point encoded as a 32-bit value
std::is_a_letter checks wheter its argument is a letter (upper or lower case)
std::is_a_letter_character returns for letter characters