strusBase  0.17
env.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
9 #ifndef _STRUS_BASE_ENV_HPP_INCLUDED
10 #define _STRUS_BASE_ENV_HPP_INCLUDED
11 #include <string>
12 #include <vector>
13 
14 namespace strus
15 {
16 
21 int getenv( const std::string& var, std::string& output);
22 
28 int getenv_list( const std::string& var, char sep, std::vector<std::string>& output);
29 
33 char separatorPathList();
34 
35 }
36 #endif
37 
38 
int getenv(const std::string &var, std::string &output)
Read an environment variable value as string.
char separatorPathList()
Separator character used for separating file paths in environment variables.
int getenv_list(const std::string &var, char sep, std::vector< std::string > &output)
Read an environment variable value as array of strings, separated by a separator character.