From 7a4582a570657cee6e62842a98a0c7be3da7cb03 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 27 May 2018 15:32:12 +0200 Subject: Move syntax from string/filename utilities to public API --- serd/serd.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'serd') diff --git a/serd/serd.h b/serd/serd.h index 32dfa128..32b53b8b 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -397,6 +397,32 @@ SERD_API void* serd_base64_decode(const char* str, size_t len, size_t* size); +/** + @} + @name Syntax Utilities + @{ +*/ + +/** + Get a syntax by name. + + Case-insensitive, supports "Turtle", "NTriples", "NQuads", and "TriG". Zero + is returned if the name is not recognized. +*/ +SERD_API +SerdSyntax +serd_syntax_by_name(const char* name); + +/** + Guess a syntax from a filename. + + This uses the file extension to guess the syntax of a file. Zero is + returned if the extension is not recognized. +*/ +SERD_API +SerdSyntax +serd_guess_syntax(const char* filename); + /** @} @name URI -- cgit v1.2.1