BeRTOS
|
Poor man's hex arrays (implementation). More...
#include "strtol10.h"
Go to the source code of this file.
Functions | |
bool | strtoul10 (const char *first, const char *last, unsigned long *val) |
Convert a formatted base-10 ASCII number to unsigned long binary representation. | |
bool | strtol10 (const char *first, const char *last, long *val) |
Convert a formatted base-10 ASCII number to signed long binary representation. |
Poor man's hex arrays (implementation).
Definition in file strtol10.c.
bool strtol10 | ( | const char * | first, |
const char * | last, | ||
long * | val | ||
) |
Convert a formatted base-10 ASCII number to signed long binary representation.
Definition at line 80 of file strtol10.c.
bool strtoul10 | ( | const char * | first, |
const char * | last, | ||
unsigned long * | val | ||
) |
Convert a formatted base-10 ASCII number to unsigned long binary representation.
Unlike the standard strtoul(), this function has an interface that makes it better suited for protocol parsers. It's also much simpler and smaller than a full featured strtoul().
first | Pointer to first byte of input range (STL-style). |
last | Pointer to end of input range (STL-style). Pass NULL to parse up to the first \0. |
val | Pointer to converted value. |
Definition at line 56 of file strtol10.c.