diff options
author | David Robillard <d@drobilla.net> | 2021-07-31 16:43:50 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 21:57:07 -0500 |
commit | 2bb0250be8297cc950d0036915ecdf61ab6f3700 (patch) | |
tree | ce8051b08017ac54c3195b529647b8b6422e9639 /src/read_ntriples.h | |
parent | 155fceabe7070b6610d577734734d038d097b088 (diff) | |
download | serd-2bb0250be8297cc950d0036915ecdf61ab6f3700.tar.gz serd-2bb0250be8297cc950d0036915ecdf61ab6f3700.tar.bz2 serd-2bb0250be8297cc950d0036915ecdf61ab6f3700.zip |
Factor out and expose prefixed name predicates
Towards using these in the writer to escape names more precisely.
Diffstat (limited to 'src/read_ntriples.h')
-rw-r--r-- | src/read_ntriples.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/read_ntriples.h b/src/read_ntriples.h index a2f6d232..d8577130 100644 --- a/src/read_ntriples.h +++ b/src/read_ntriples.h @@ -22,32 +22,6 @@ #include <stdbool.h> #include <stdint.h> -// Utilities - -static inline bool -codepoint_in_range(const uint32_t c, const uint32_t min, const uint32_t max) -{ - return c >= min && c <= max; -} - -static inline bool -is_PN_CHARS_BASE(const uint32_t c) -{ - return (codepoint_in_range(c, 'A', 'Z') || codepoint_in_range(c, 'a', 'z') || - codepoint_in_range(c, 0x000C0u, 0x000D6u) || - codepoint_in_range(c, 0x000D8u, 0x000F6u) || - codepoint_in_range(c, 0x000F8u, 0x002FFu) || - codepoint_in_range(c, 0x00370u, 0x0037Du) || - codepoint_in_range(c, 0x0037Fu, 0x01FFFu) || - codepoint_in_range(c, 0x0200Cu, 0x0200Du) || - codepoint_in_range(c, 0x02070u, 0x0218Fu) || - codepoint_in_range(c, 0x02C00u, 0x02FEFu) || - codepoint_in_range(c, 0x03001u, 0x0D7FFu) || - codepoint_in_range(c, 0x0F900u, 0x0FDCFu) || - codepoint_in_range(c, 0x0FDF0u, 0x0FFFDu) || - codepoint_in_range(c, 0x10000u, 0xEFFFFu)); -} - /** Read one (possibly multi-byte) character (possibly multi-byte). |