Str.asciiDigitValue

Determines the numeric value of a character as a decimal digit. Differs from g_unichar_digit_value() because it takes a char, so there's no worry about sign extension if characters are signed.

struct Str
static
int
asciiDigitValue
(
char c
)

Parameters

c char

an ASCII character

Return Value

Type: int

If @c is a decimal digit (according to g_ascii_isdigit()), its numeric value. Otherwise, -1.

Meta