asciiDigitValue

Determines the numeric value of a character as a decimal digit. If the character is not a decimal digit according to funcGLib.ascii_isdigit, -1 is returned.

Differs from funcGLib.unichar_digit_value because it takes a char, so there's no worry about sign extension if characters are signed.

int
asciiDigitValue
(
char c
)

Parameters

c char

an ASCII character

Return Value

Type: int

the numerical value of c if it is a decimal digit, -1 otherwise