shithub: scc

ref: 95552e35a889ea98c511ffc72ebc62d9fd48121a
dir: /src/libc/stdlib/_dtoi.c/

View raw version
#include <ctype.h>
#include <limits.h>
#include <string.h>

int
_dtoi(char c)
{
	static const char digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	char *p;

	if (p = strchr(digits, toupper(c)))
		return p - digits;

	return INT_MAX;
}