aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-02-20 13:53:52 -0500
committerDavid Robillard <d@drobilla.net>2022-01-13 15:33:54 -0500
commit40588864972d1de767c669c8e5e9b50e652a459b (patch)
tree82b325f63a16f482baa0a2215eeaa607bd88277d /include/serd
parente9d1b73352e9254e0b46f7af31acc5411d500baf (diff)
downloadserd-40588864972d1de767c669c8e5e9b50e652a459b.tar.gz
serd-40588864972d1de767c669c8e5e9b50e652a459b.tar.bz2
serd-40588864972d1de767c669c8e5e9b50e652a459b.zip
Add serd_node_string_view()
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index a55caffc..acda6ae0 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -574,6 +574,16 @@ SERD_PURE_API
size_t
serd_node_length(const SerdNode* SERD_NULLABLE 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);
+
/// Return the flags (string properties) of a node
SERD_PURE_API
SerdNodeFlags