libc8
CHIP-8 utility library
|
Go to the source code of this file.
Functions | |
int | hex_to_int (char) |
Get the integer value of hexadecimal ASCII representation. More... | |
int | parse_int (const char *) |
Parse decimal or hexadecimal integer from s More... | |
char * | trim (char *) |
Trim leading and trailing whitespace from s More... | |
Miscellaneous useful functions.
int hex_to_int | ( | char | c | ) |
Get the integer value of hexadecimal ASCII representation.
c | the char to convert |
int parse_int | ( | const char * | s | ) |
Parse decimal or hexadecimal integer from s
Converts string s
to an integer. Assumes decimal unless the first character is ‘’$'or
'x'`.
s | The string to convert. |
char * trim | ( | char * | s | ) |
Trim leading and trailing whitespace from s
Puts a NULL
character after the last non-whitespace character and returns a pointer to the first non-whitespace character.
s | string to trim |
s
.