diff options
Diffstat (limited to 'libbb/xatol.c')
-rw-r--r-- | libbb/xatol.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libbb/xatol.c b/libbb/xatol.c index 74a3b99..cce8ad3 100644 --- a/libbb/xatol.c +++ b/libbb/xatol.c @@ -195,6 +195,16 @@ long xatol(const char *numstr) /* Others */ +unsigned xatou_range(const char *numstr, unsigned lower, unsigned upper) +{ + return xstrtoul_range_sfx(numstr, 10, lower, upper, NULL); +} + +unsigned xatou_sfx(const char *numstr, const struct suffix_mult *suffixes) +{ + return xstrtoul_range_sfx(numstr, 10, 0, UINT_MAX, suffixes); +} + unsigned xatou(const char *numstr) { return xatoul_range(numstr, 0, UINT_MAX); |