diff options
author | David Robillard <d@drobilla.net> | 2017-07-09 14:59:05 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-07-09 14:59:05 +0200 |
commit | 4d535bbe0390ed4f03c611e433145c9e49cbf3ad (patch) | |
tree | 3ec86327944909c214dabe419ef67c3400fb1aec /src/serd_internal.h | |
parent | 4270fbbc761e4d36e9fc28a361b7e8d7c21166d2 (diff) | |
download | serd-4d535bbe0390ed4f03c611e433145c9e49cbf3ad.tar.gz serd-4d535bbe0390ed4f03c611e433145c9e49cbf3ad.tar.bz2 serd-4d535bbe0390ed4f03c611e433145c9e49cbf3ad.zip |
Add serd_node_from_substring()
This allows creating nodes in-place from substrings of other strings to allow
zero-copy serialization from existing delimited buffers.
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r-- | src/serd_internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h index afbea5fb..55f6a6b6 100644 --- a/src/serd_internal.h +++ b/src/serd_internal.h @@ -325,6 +325,12 @@ is_windows_path(const uint8_t* path) && (path[2] == '/' || path[2] == '\\'); } +size_t +serd_substrlen(const uint8_t* str, + const size_t len, + size_t* n_bytes, + SerdNodeFlags* flags); + /* URI utilities */ static inline bool |