diff options
author | David Robillard <d@drobilla.net> | 2018-02-04 12:40:45 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-03-07 15:32:23 -0500 |
commit | ecbc7584a09059ab5987dca95a998c88de8b479a (patch) | |
tree | def8e15dcdfbe60b088cce1ed68b779b66fd055b /include | |
parent | c0410fab52f4e2e36c2779a6ec8dc9ef89a8ee58 (diff) | |
download | serd-ecbc7584a09059ab5987dca95a998c88de8b479a.tar.gz serd-ecbc7584a09059ab5987dca95a998c88de8b479a.tar.bz2 serd-ecbc7584a09059ab5987dca95a998c88de8b479a.zip |
Add node accessor API
Diffstat (limited to 'include')
-rw-r--r-- | include/serd/serd.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index c1dcd2f6..ada5f2b9 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -581,6 +581,26 @@ SERD_API SerdNode serd_node_copy(const SerdNode* SERD_NULLABLE node); +/// Return the type of a node (SERD_URI, SERD_BLANK, or SERD_LITERAL) +SERD_PURE_API +SerdNodeType +serd_node_type(const SerdNode* SERD_NONNULL node); + +/// Return the string value of a node +SERD_PURE_API +const char* SERD_NONNULL +serd_node_string(const SerdNode* SERD_NONNULL node); + +/// Return the length of the string value of a node in bytes +SERD_PURE_API +size_t +serd_node_length(const SerdNode* SERD_NONNULL node); + +/// Return the flags (string properties) of a node +SERD_PURE_API +SerdNodeFlags +serd_node_flags(const SerdNode* SERD_NONNULL node); + /// Return true iff `a` is equal to `b` SERD_PURE_API bool |