diff options
Diffstat (limited to 'src/common/utils.c')
-rw-r--r-- | src/common/utils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/utils.c b/src/common/utils.c index 530ab6c..692d1ce 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -167,6 +167,14 @@ bc_strdup_printf(const char *format, ...) } +// locale-independent implementation of isspace +bool +bc_isspace(int c) +{ + return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v'; +} + + bool bc_str_starts_with(const char *str, const char *prefix) { |