aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/posix.getenv.ccm
blob: 465f7e7675cfd2dd76c0a9e4af4ff2fca4a57a27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * This source code is released into the public domain.
 */

module;

#include <expected>
#include <string>

export module nihil.posix:getenv;

import nihil.error;

namespace nihil {

/*
 * Find a variable by the given name in the environment by calling getenv_r().
 */

export [[nodiscard]] auto getenv(std::string_view varname)
	-> std::expected<std::string, error>;

} // namespace nihil