aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/node.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index ea9d174d..c4620671 100644
--- a/src/node.c
+++ b/src/node.c
@@ -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)
{