blob: 5861b284e5eb50c197a9be9f70d7d04b00b00ef8 [file] [log] [blame]
// Copyright Microsoft and CHERIoT Contributors.
// SPDX-License-Identifier: MIT
#pragma once
static inline int isprint(int c)
{
return c >= '\x20' && c <= '\x7e';
}
static inline int isdigit(int c)
{
return c >= '0' && c <= '9';
}
static inline int isspace(int c)
{
switch (c)
{
default:
return 0;
case '\t':
case '\n':
case '\v':
case '\f':
case '\r':
case ' ':
return 1;
}
}