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 69034603..7508f45d 100644
--- a/src/node.c
+++ b/src/node.c
@@ -507,6 +507,18 @@ serd_node_string_view(const SerdNode* SERD_NONNULL node)
return result;
}
+SerdURIView
+serd_node_uri_view(const SerdNode* SERD_NONNULL node)
+{
+ SerdURIView result = SERD_URI_NULL;
+
+ if (node->type == SERD_URI) {
+ serd_uri_parse(serd_node_string(node), &result);
+ }
+
+ return result;
+}
+
const SerdNode*
serd_node_datatype(const SerdNode* node)
{