ref: 2e7e4ca6b9def1b7bae6b93285f6431039f9656a
dir: /src/libc/stdlib/_dtoi.c/
#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;
}