// Copyright 2011-2020 David Robillard // SPDX-License-Identifier: ISC #ifndef SERD_SRC_ENV_H #define SERD_SRC_ENV_H #include "serd/env.h" #include "serd/status.h" #include "serd/string_view.h" #include "serd/uri.h" #include "zix/attributes.h" /** Return the URI for the prefix with the given name. If no such prefix is known, returns an empty string view. */ ZIX_PURE_FUNC SerdStringView serd_env_find_prefix(const SerdEnv* env, SerdStringView name); /** Expand `curie`. Errors: SERD_BAD_ARG if `curie` is not valid, or SERD_BAD_CURIE if prefix is not defined in `env`. */ SerdStatus serd_env_expand_in_place(const SerdEnv* env, SerdStringView curie, SerdStringView* uri_prefix, SerdStringView* uri_suffix); ZIX_PURE_FUNC SerdURIView serd_env_base_uri_view(const SerdEnv* env); #endif // SERD_SRC_ENV_H