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>
|
||||
int isdigit (int);
|
||||
int isxdigit (int);
|
||||
int isspace (int);
|
||||
#endif // ! (__GNUC__ && POSIX)
|
||||
|
||||
#endif // __MES_CTYPE_H
|
||||
|
|
|
@ -41,6 +41,12 @@ isxdigit (int c)
|
|||
return isdigit (c) || (c>='a') && (c<='f');
|
||||
}
|
||||
|
||||
int
|
||||
isspace (int c)
|
||||
{
|
||||
return (c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r' || c == ' ');
|
||||
}
|
||||
|
||||
int
|
||||
isnumber (int c, int base)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue