diff options
author | David Robillard <d@drobilla.net> | 2021-02-20 13:53:52 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 16:27:02 -0500 |
commit | 290be9610e32bb427dd0456e4b1e26526c479004 (patch) | |
tree | 0bced58585c4d8a9977415fcaf9354c956626102 /src | |
parent | e80312a5ac9cdeaaa0d4f81e7aa258572d695c74 (diff) | |
download | serd-290be9610e32bb427dd0456e4b1e26526c479004.tar.gz serd-290be9610e32bb427dd0456e4b1e26526c479004.tar.bz2 serd-290be9610e32bb427dd0456e4b1e26526c479004.zip |
Add serd_node_string_view()
Diffstat (limited to 'src')
-rw-r--r-- | src/node.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -11,6 +11,7 @@ #include "serd/buffer.h" #include "serd/node.h" #include "serd/string.h" +#include "serd/string_view.h" #include "serd/uri.h" #include <assert.h> @@ -449,6 +450,14 @@ serd_node_length(const SerdNode* const node) return node->length; } +SerdStringView +serd_node_string_view(const SerdNode* const node) +{ + const SerdStringView r = {(const char*)(node + 1), node->length}; + + return r; +} + SerdNodeFlags serd_node_flags(const SerdNode* const node) { |