From 530edb265fbbed20e6d3a6fd7a36461ff83d9b46 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 20 Dec 2022 09:47:26 -0500 Subject: Add serd_env_unset_prefix() --- include/serd/env.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/serd/env.h b/include/serd/env.h index 9ec2ef6a..a894ee4f 100644 --- a/include/serd/env.h +++ b/include/serd/env.h @@ -72,6 +72,18 @@ serd_env_set_prefix(SerdEnv* ZIX_NONNULL env, ZixStringView name, ZixStringView uri); +/** + Unset a namespace prefix. + + This removes the namespace prefix with the given name, if present. No such + prefix being found is not considered an error, that is, the call is + successful as long as the prefix is not set in the env upon return. + + @return #SERD_SUCCESS if the prefix was removed or not present, or an error. +*/ +SERD_API SerdStatus +serd_env_unset_prefix(SerdEnv* ZIX_NONNULL env, ZixStringView name); + /** Qualify `uri` into a prefix and suffix (like a CURIE) if possible. -- cgit v1.2.1