diff options
Diffstat (limited to 'include/strutils.h')
-rw-r--r-- | include/strutils.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/strutils.h b/include/strutils.h index aa31fc984..28c1b5e5d 100644 --- a/include/strutils.h +++ b/include/strutils.h @@ -39,8 +39,12 @@ extern unsigned long strtoul_or_err(const char *str, const char *errmesg); extern void strtotimeval_or_err(const char *str, struct timeval *tv, const char *errmesg); -extern int isdigit_string(const char *str); -extern int isxdigit_string(const char *str); +extern int isdigit_strend(const char *str, const char **end); +#define isdigit_string(_s) isdigit_strend(_s, NULL) + +extern int isxdigit_strend(const char *str, const char **end); +#define isxdigit_string(_s) isxdigit_strend(_s, NULL) + extern int parse_switch(const char *arg, const char *errmesg, ...); |