|
libcfe
0.12.1
some useful C-functions
|
#include <stdint.h>Go to the source code of this file.
Functions | |
| short int | check_int (const char *s, int len, uint8_t base) |
| unsigned long long | char_to_int (const char *s, int i, uint8_t base) |
| unsigned long long char_to_int | ( | const char * | s, |
| int | i, | ||
| uint8_t | base | ||
| ) |
Return the number this string represents, but only if the contains only (hexadecimal) numbers.
| [in] | s | The string that contains the number. |
| [in] | i | The length of the string that s points to. |
| [in] | base | The base number (binary -> 2, octal -> 8, decimal -> 10, hexadecimal -> 16), this must not be bigger than 16. |
Definition at line 24 of file char_to_int.c.
| short int check_int | ( | const char * | s, |
| int | len, | ||
| uint8_t | base | ||
| ) |
Check if the string represents a decimal value.
| [in] | s | The string that contains the number. |
| [in] | i | The length of the string that s points to. |
Definition at line 8 of file char_to_int.c.