GLib.ascii_xdigit_value
Description: Reference for GLib.ascii_xdigit_value

### Function

# GLibascii_xdigit_value

#### Declaration [src]

    gint
    g_ascii_xdigit_value (
      gchar c
    )

#### Description [src]

Determines the numeric value of a character as a hexadecimal digit. If the character is not a hex digit according to `g_ascii_isxdigit()`, `-1` is returned.

Differs from `g_unichar_xdigit_value()` because it takes a char, so there’s no worry about sign extension if characters are signed.

Differs from `g_unichar_xdigit_value()` because it takes a char, so there’s no worry about sign extension if characters are signed.

#### Parameters

`c`

  Type: `gchar`

  An ASCII character.

#### Return value

Type: `gint`

The numerical value of `c` if it is a hex digit, `-1` otherwise.