https://github.com/torvalds/linux
Raw File
Tip revision: b1940cd21c0f4abdce101253e860feff547291b0 authored by Linus Torvalds on 06 January 2015, 01:05:20 UTC
Linux 3.19-rc3
Tip revision: b1940cd
ctype.h
#ifndef BOOT_ISDIGIT_H

#define BOOT_ISDIGIT_H

static inline int isdigit(int ch)
{
	return (ch >= '0') && (ch <= '9');
}

static inline int isxdigit(int ch)
{
	if (isdigit(ch))
		return true;

	if ((ch >= 'a') && (ch <= 'f'))
		return true;

	return (ch >= 'A') && (ch <= 'F');
}

#endif
back to top