aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h
index ca72a232..027c4e20 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -449,6 +449,16 @@ SerdNode
serd_node_from_string(SerdType type, const uint8_t* str);
/**
+ Make a (shallow) node from a prefix of `str`.
+
+ This measures, but does not copy, `str`. No memory is allocated.
+ Note that the returned node may not be null terminated.
+*/
+SERD_API
+SerdNode
+serd_node_from_substring(SerdType type, const uint8_t* str, size_t len);
+
+/**
Make a deep copy of `node`.
@return a node that the caller must free with serd_node_free().