Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
expand_environment_variables.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2  * tlx/string/expand_environment_variables.hpp
3  *
4  * Part of tlx - http://panthema.net/tlx
5  *
6  * Copyright (C) 2018 Timo Bingmann <[email protected]>
7  *
8  * All rights reserved. Published under the Boost Software License, Version 1.0
9  ******************************************************************************/
10 
11 #ifndef TLX_STRING_EXPAND_ENVIRONMENT_VARIABLES_HEADER
12 #define TLX_STRING_EXPAND_ENVIRONMENT_VARIABLES_HEADER
13 
14 #include <string>
15 
16 namespace tlx {
17 
18 //! \addtogroup tlx_string
19 //! \{
20 
21 /*!
22  * Expand substrings $ABC_123 and ${ABC_123} into the corresponding environment
23  * variables. Matches all substrings "$[a-zA-Z_][a-zA-Z0-9_]*" and
24  * "${[^}]*}". Replaces all substrings in-place.
25  */
27 
28 /*!
29  * Expand substrings $ABC_123 and ${ABC_123} into the corresponding environment
30  * variables. Matches all substrings "$[a-zA-Z_][a-zA-Z0-9_]*" and
31  * "${[^}]*}". Returns a copy of the string with all substrings replaced.
32  */
34 
35 /*!
36  * Expand substrings $ABC_123 and ${ABC_123} into the corresponding environment
37  * variables. Matches all substrings "$[a-zA-Z_][a-zA-Z0-9_]*" and
38  * "${[^}]*}". Returns a copy of the string with all substrings replaced.
39  */
41 
42 //! \}
43 
44 } // namespace tlx
45 
46 #endif // !TLX_STRING_EXPAND_ENVIRONMENT_VARIABLES_HEADER
47 
48 /******************************************************************************/
std::string & expand_environment_variables(std::string *sp)
Expand substrings $ABC_123 and ${ABC_123} into the corresponding environment variables.
std::basic_string< char, std::char_traits< char >, Allocator< char > > string
string with Manager tracking
Definition: allocator.hpp:220