• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 
3 #include <commonlib/bsd/string.h>
4 #include <ctype.h>
5 
skip_atoi(char ** ptr)6 unsigned int skip_atoi(char **ptr)
7 {
8 	unsigned int result = 0;
9 	char *str;
10 
11 	for (str = *ptr; isdigit(str[0]); str++)
12 		result = result * 10 + (str[0] - '0');
13 	*ptr = str;
14 	return result;
15 }
16