aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index c4620671..9acbb8be 100644
--- a/src/node.c
+++ b/src/node.c
@@ -458,6 +458,18 @@ serd_node_string_view(const SerdNode* const node)
return r;
}
+SerdURIView
+serd_node_uri_view(const SerdNode* const node)
+{
+ SerdURIView result = SERD_URI_NULL;
+
+ if (node->type == SERD_URI) {
+ serd_uri_parse(serd_node_string(node), &result);
+ }
+
+ return result;
+}
+
SerdNodeFlags
serd_node_flags(const SerdNode* const node)
{