core: Add isspace.
* include/ctype.h (isspace): Declare. * lib/libc.c (isspace): New function.
This commit is contained in:
parent
45e347588c
commit
25907f514c
|
@ -31,6 +31,7 @@
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
int isdigit (int);
|
int isdigit (int);
|
||||||
int isxdigit (int);
|
int isxdigit (int);
|
||||||
|
int isspace (int);
|
||||||
#endif // ! (__GNUC__ && POSIX)
|
#endif // ! (__GNUC__ && POSIX)
|
||||||
|
|
||||||
#endif // __MES_CTYPE_H
|
#endif // __MES_CTYPE_H
|
||||||
|
|
|
@ -41,6 +41,12 @@ isxdigit (int c)
|
||||||
return isdigit (c) || (c>='a') && (c<='f');
|
return isdigit (c) || (c>='a') && (c<='f');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
isspace (int c)
|
||||||
|
{
|
||||||
|
return (c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r' || c == ' ');
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
isnumber (int c, int base)
|
isnumber (int c, int base)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue