diff options
author | David Robillard <d@drobilla.net> | 2023-03-24 20:59:54 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:07 -0500 |
commit | 65cbb4a13f615658282677fcf04685bae63e893c (patch) | |
tree | b9c66e757cf28ce96906d3426300811645753173 /src/turtle.h | |
parent | c661dbe50d7f634ec5b2863260f41f098fc9c882 (diff) | |
download | serd-65cbb4a13f615658282677fcf04685bae63e893c.tar.gz serd-65cbb4a13f615658282677fcf04685bae63e893c.tar.bz2 serd-65cbb4a13f615658282677fcf04685bae63e893c.zip |
Support writing all escapes in Turtle and TriG prefixed names
Diffstat (limited to 'src/turtle.h')
-rw-r--r-- | src/turtle.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/turtle.h b/src/turtle.h index 6e7e3a8d..f794e1e8 100644 --- a/src/turtle.h +++ b/src/turtle.h @@ -8,7 +8,6 @@ #include "string_utils.h" #include <stdbool.h> -#include <string.h> static inline bool is_PN_CHARS_U(const int c) @@ -26,7 +25,10 @@ is_PN_CHARS(const int c) static inline bool is_PN_LOCAL_ESC(const int c) { - return strchr("!#$%&\'()*+,-./;=?@_~", c) != NULL; + return c == '!' || c == '#' || c == '$' || c == '%' || c == '&' || + c == '\'' || c == '(' || c == ')' || c == '*' || c == '+' || + c == ',' || c == '-' || c == '.' || c == '/' || c == ';' || c == '=' || + c == '?' || c == '@' || c == '\\' || c == '_' || c == '~'; } #endif // SERD_SRC_TURTLE_H |