---
name: "firestring_hextoi"
section: "3"
platform: "linux"
package: "libfirestring-dev"
version: "0.9.12-8"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/firestring_hextoi"
---

# firestring\_hextoi(3)

return a numerical value for a 2 digit hex string

## NAME

firestring\_hextoi - return a numerical value for a 2 digit hex string

## SYNOPSIS

**#include \<firestring.h\>**\
 **-lfirestring**

**int firestring\_hextoi(char \****input***)**

## DESCRIPTION

firestring\_hextoi takes a string *s* with the first two characters as hex digits and converts the value to a integer.

## RETURN VALUE

Returns the hex value between 0 and 255 (inclusive), or -1 if the first two characters of *s* are not valid hex digits.

## AUTHOR

Ian Gulliver \<ian@penguinhosting.net\>

## SEE ALSO

[**libfirestring**(3)](/libfirestring/3.md)
