aboutsummaryrefslogtreecommitdiffstats
path: root/src/turtle.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-03-24 20:59:54 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:07 -0500
commit65cbb4a13f615658282677fcf04685bae63e893c (patch)
treeb9c66e757cf28ce96906d3426300811645753173 /src/turtle.h
parentc661dbe50d7f634ec5b2863260f41f098fc9c882 (diff)
downloadserd-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.h6
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