From 255fa256b106506e0c951f704314c5c633217468 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Wed, 25 Sep 2024 11:25:25 -0500 Subject: Further expansion of string api. --- include/libfud.hpp | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'include/libfud.hpp') diff --git a/include/libfud.hpp b/include/libfud.hpp index ceb1b20..a0b2909 100644 --- a/include/libfud.hpp +++ b/include/libfud.hpp @@ -18,31 +18,25 @@ #ifndef LIBFUD_HPP #define LIBFUD_HPP -#include "fud_status.hpp" // IWYU pragma: export +#include "fud_status.hpp" +#include "fud_result.hpp" +#include "fud_string.hpp" -#include "fud_result.hpp" // IWYU pragma: export - -#include "fud_memory.hpp" // IWYU pragma: export - -#include "fud_assert.hpp" // IWYU pragma: export - -#include "fud_array.hpp" // IWYU pragma: export - -#include "fud_c_file.hpp" // IWYU pragma: export - -#include "fud_fud_type_traits.hpp" // IWYU pragma: export - -#include "fud_string.hpp" // IWYU pragma: export - -#include "fud_unique_array.hpp" // IWYU pragma: export +namespace fud { -#include "fud_utf8.hpp" // IWYU pragma: export +Result getEnv(const char* name); -#include "fud_utf8_iterator.hpp" // IWYU pragma: export +template +concept CStringRepr = requires(T a) +{ + { a.c_str() } -> std::convertible_to; +}; -namespace fud { - -void fud(); +template +Result getEnv(const T& name) +{ + return getEnv(name.c_str()); +} } -- cgit v1.2.3