From 65cbb4a13f615658282677fcf04685bae63e893c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 24 Mar 2023 20:59:54 -0400 Subject: Support writing all escapes in Turtle and TriG prefixed names --- src/turtle.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/turtle.h') 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 -#include 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 -- cgit v1.2.1