1 /* ISC license. */
2 
3 #include <skalibs/uint32.h>
4 #include <skalibs/uint64.h>
5 #include "fmtscan-internal.h"
6 
uint32_scan_base(char const * s,uint32_t * u,uint8_t base)7 size_t uint32_scan_base (char const *s, uint32_t *u, uint8_t base)
8 {
9   uint64_t uu ;
10   size_t pos = uint64_scan_base_max(s, &uu, base, UINT32_MAX) ;
11   if (pos) *u = (uint32_t)uu ;
12   return pos ;
13 }
14