diff options
author | David Robillard <d@drobilla.net> | 2021-02-20 13:53:52 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-03-07 15:32:24 -0500 |
commit | 2607dd857a2a518ba472208bf0237c6cd0c59b32 (patch) | |
tree | 3bd44d99a2d0e82e9b13dff4053b29fe0b1f11ba /src/node.c | |
parent | 6f03ae92415a7758fdc74f6720ec4955bc67fc0c (diff) | |
download | serd-2607dd857a2a518ba472208bf0237c6cd0c59b32.tar.gz serd-2607dd857a2a518ba472208bf0237c6cd0c59b32.tar.bz2 serd-2607dd857a2a518ba472208bf0237c6cd0c59b32.zip |
Add serd_node_string_view()
Diffstat (limited to 'src/node.c')
-rw-r--r-- | src/node.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -499,6 +499,14 @@ serd_node_length(const SerdNode* node) return node->n_bytes; } +SerdStringView +serd_node_string_view(const SerdNode* SERD_NONNULL node) +{ + const SerdStringView result = {(const char*)(node + 1), node->n_bytes}; + + return result; +} + const SerdNode* serd_node_datatype(const SerdNode* node) { |