diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2019-02-09 02:29:05 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2019-02-09 02:29:05 +0100 |
commit | 49ed30a5e87e510fd0c14b367110175f9d2fb144 (patch) | |
tree | 348319b8696aa917813c185b1e2e0425b44bf4f9 /src/common/utils.c | |
parent | 26325e3e684dc87b9751750d2a98ba6a61f8f055 (diff) | |
download | blogc-49ed30a5e87e510fd0c14b367110175f9d2fb144.tar.gz blogc-49ed30a5e87e510fd0c14b367110175f9d2fb144.tar.bz2 blogc-49ed30a5e87e510fd0c14b367110175f9d2fb144.zip |
blogc: template: allow whitespaces in template tags, not just spaces
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) { |