From f5b346c9120b9a10119b81a375de66a167ced0b5 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Wed, 1 Nov 2017 13:21:40 +0100 Subject: string.h: Add isprint() Change-Id: If179687f0a15cf5b16723ad18d8eb86a2d5fa48d Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/29479 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/include/string.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/include') diff --git a/src/include/string.h b/src/include/string.h index fc96393c48..2f6b5f1b68 100644 --- a/src/include/string.h +++ b/src/include/string.h @@ -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) { return (c >= '0' && c <= '9'); -- cgit v1.2.3