fplayer
C99 Falcon Sequence (fseq) file player for Light-O-Rama hardware (like xLights)
|
String parsing functions. More...
Go to the source code of this file.
Functions | |
int | strtolb (const char *str, long min, long max, void *p, int ps) |
Attempts to parse the given string as a long using strtol . If the parsed value is within the given range, it is stored in the given pointer using memcpy, which results in a type-agnostic function. The size of the destination type must be provided in bytes. The destination is only updated if the parsed value is within the given range. The caller should take care to ensure the destination type is large enough to store the parsed value. | |
String parsing functions.
int strtolb | ( | const char * | str, |
long | min, | ||
long | max, | ||
void * | p, | ||
int | ps ) |
Attempts to parse the given string as a long using strtol
. If the parsed value is within the given range, it is stored in the given pointer using memcpy, which results in a type-agnostic function. The size of the destination type must be provided in bytes. The destination is only updated if the parsed value is within the given range. The caller should take care to ensure the destination type is large enough to store the parsed value.
str | string to parse |
min | minimum value (inclusive) supported by the destination type |
max | maximum value (inclusive) supported by the destination type |
p | pointer to store the parsed value |
ps | size of the destination type in bytes |