From 8249b28bea29e8ce17eac12776a60ec3f9e47176 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Thu, 17 Oct 2024 19:42:29 -0500 Subject: Rename InvalidInput to ArgumentInvalid. --- include/libfud.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/libfud.hpp') diff --git a/include/libfud.hpp b/include/libfud.hpp index 5bc1630..bff791d 100644 --- a/include/libfud.hpp +++ b/include/libfud.hpp @@ -19,6 +19,7 @@ #define LIBFUD_HPP #include "fud_array.hpp" +#include "fud_allocator.hpp" #include "fud_result.hpp" #include "fud_status.hpp" #include "fud_string.hpp" @@ -43,12 +44,13 @@ FUD fud(); * \brief Get an environmental variable if it exists. * * \param[in] name The name of the variable to look up. + * \param[in] allocator The allocator used by the string returned. * * \retstmt The value of the string bound to the variable if it exists. * \retcode FudStatus::NullPointer if name is a null pointer. * \retcode FudStatus::NotFound if no binding for the variable exists. */ -Result getEnv(const char* name); +Result getEnv(const char* name, Allocator* allocator= &globalFudAllocator); template concept CStringRepr = requires(T strObj) { @@ -56,9 +58,9 @@ concept CStringRepr = requires(T strObj) { }; template -Result getEnv(const T& name) +Result getEnv(const T& name, Allocator* allocator = &globalFudAllocator) { - return getEnv(name.c_str()); + return getEnv(name.c_str(), allocator); } } // namespace fud -- cgit v1.2.3