Browse Source

[libc] Add isxdigit()

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Piotr Jaroszyński 14 years ago
parent
commit
6e4573bcd0
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/include/ctype.h

+ 1
- 0
src/include/ctype.h View File

@@ -11,6 +11,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
11 11
 #define isdigit(c)	((c) >= '0' && (c) <= '9')
12 12
 #define islower(c)	((c) >= 'a' && (c) <= 'z')
13 13
 #define isupper(c)	((c) >= 'A' && (c) <= 'Z')
14
+#define isxdigit(c)	(isdigit(c) || ((c) >= 'A' && (c) <= 'F') || ((c) >= 'a' && (c) <= 'f'))
14 15
 
15 16
 static inline unsigned char tolower(unsigned char c)
16 17
 {

Loading…
Cancel
Save