aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index 14efddd3..69034603 100644
--- a/src/node.c
+++ b/src/node.c
@@ -499,6 +499,14 @@ serd_node_length(const SerdNode* node)
return node->n_bytes;
}
+SerdStringView
+serd_node_string_view(const SerdNode* SERD_NONNULL node)
+{
+ const SerdStringView result = {(const char*)(node + 1), node->n_bytes};
+
+ return result;
+}
+
const SerdNode*
serd_node_datatype(const SerdNode* node)
{