string.h: Add isprint()

Change-Id: If179687f0a15cf5b16723ad18d8eb86a2d5fa48d
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/29479
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Nico Huber 2017-11-01 13:21:40 +01:00 committed by Patrick Georgi
parent bd294425c8
commit f5b346c912
1 changed files with 5 additions and 0 deletions

View File

@ -156,6 +156,11 @@ static inline int isspace(int c)
} }
} }
static inline int isprint(int c)
{
return c >= ' ' && c <= '~';
}
static inline int isdigit(int c) static inline int isdigit(int c)
{ {
return (c >= '0' && c <= '9'); return (c >= '0' && c <= '9');