summaryrefslogtreecommitdiff
path: root/include/libfud.hpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-09-25 11:25:25 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-09-25 11:25:25 -0500
commit255fa256b106506e0c951f704314c5c633217468 (patch)
treeacda2292f4ef315a64de763d4ee8e9a82f587a8c /include/libfud.hpp
parent204dad55119df079ca54309bc4b740280fa54c31 (diff)
Further expansion of string api.
Diffstat (limited to 'include/libfud.hpp')
-rw-r--r--include/libfud.hpp36
1 files changed, 15 insertions, 21 deletions
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<String, FudStatus> getEnv(const char* name);
-#include "fud_utf8_iterator.hpp" // IWYU pragma: export
+template<typename T>
+concept CStringRepr = requires(T a)
+{
+ { a.c_str() } -> std::convertible_to<const char*>;
+};
-namespace fud {
-
-void fud();
+template <CStringRepr T>
+Result<String, FudStatus> getEnv(const T& name)
+{
+ return getEnv(name.c_str());
+}
}