I have a string 0xFF, is there any function like atoi which reads that string and save in a uint32_t format?
0xFF
atoi
uint32_t
const char *str = "0xFF"; uint32_t value; if (1 == sscanf(str, "0x%"SCNx32, &value)) { // value now contains the value in the string--decimal 255, in this case. }