summaryrefslogtreecommitdiff
path: root/util.h
blob: 0234a68f39827c729938bef00b69a04d66927dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
 * Wrappers around strtoull/strtoll that are safer and easier to
 * use.  For tests and assumptions, see internal_tests.c.
 *
 * str   a NULL-terminated base decimal 10 unsigned integer
 * out   out parameter, if conversion succeeded
 *
 * returns true if conversion succeeded.
 */
bool safe_strtoull(const char *str, unsigned long long *out);
bool safe_strtoll(const char *str, long long *out);