aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-12-09 10:05:19 -0500
committerDavid Robillard <d@drobilla.net>2022-12-09 10:05:19 -0500
commit221636904b9389a3709c40c38ca3dbf51e4c32f7 (patch)
tree3227a9e14cb71d9e1fb5e88a6a167f149f662165 /include/serd
parent9a222ac2ae6b4dac6dd8a414498523f472e90279 (diff)
downloadserd-221636904b9389a3709c40c38ca3dbf51e4c32f7.tar.gz
serd-221636904b9389a3709c40c38ca3dbf51e4c32f7.tar.bz2
serd-221636904b9389a3709c40c38ca3dbf51e4c32f7.zip
Add serd_reader_skip_until_byte() to public API
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index cf6b5e4d..42e85f87 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -856,6 +856,19 @@ SerdStatus
serd_reader_read_string(SerdReader* SERD_NONNULL reader,
const uint8_t* SERD_NONNULL utf8);
+/**
+ Skip over bytes in the input until a specific byte is encountered.
+
+ Typically used for recording from errors in a line-based syntax by skipping
+ ahead to the next newline.
+
+ @return #SERD_SUCCESS if the given byte was reached, or #SERD_FAILURE if the
+ end of input is reached.
+*/
+SERD_API
+SerdStatus
+serd_reader_skip_until_byte(SerdReader* SERD_NONNULL reader, uint8_t byte);
+
/// Free `reader`
SERD_API
void