aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/node.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/serd/node.h')
-rw-r--r--include/serd/node.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/serd/node.h b/include/serd/node.h
index eb4f8c9e..75725516 100644
--- a/include/serd/node.h
+++ b/include/serd/node.h
@@ -5,6 +5,7 @@
#define SERD_NODE_H
#include "serd/attributes.h"
+#include "serd/string_view.h"
#include "serd/uri.h"
#include <stdbool.h>
@@ -241,6 +242,15 @@ SERD_CONST_API const char* SERD_NONNULL
serd_node_string(const SerdNode* SERD_NONNULL node);
/**
+ Return a view of the string in a node.
+
+ This is a convenience wrapper for serd_node_string() and serd_node_length()
+ that can be used to get both in a single call.
+*/
+SERD_PURE_API SerdStringView
+serd_node_string_view(const SerdNode* SERD_NONNULL node);
+
+/**
@}
@defgroup serd_node_operators Operators
@{