summaryrefslogtreecommitdiff
path: root/src/libbiguint/bu_scanlen.c
blob: 88c6aee3725644c5ddf738fe2bdee465ae490734 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* ISC license. */

#include <skalibs/fmtscan.h>
#include <skalibs/biguint.h>

unsigned int bu_scanlen (char const *s, unsigned int *zeron)
{
  unsigned int n = ucharn_findlen(s) ;
  *zeron = n ;
  while (*s == '0') { s++ ; (*zeron)-- ; }
  return n ;
}