GLib.ascii_xdigit_value
function ascii_xdigit_value(c: Number(gchar)): Number(gint) { // Gjs wrapper for g_ascii_xdigit_value() }
Determines the numeric value of a character as a hexidecimal digit. Differs from GLib.unichar_xdigit_value because it takes a char, so there's no worry about sign extension if characters are signed.
- c
an ASCII character.
- Returns
If c is a hex digit (according to g_ascii_isxdigit()), its numeric value. Otherwise, -1.