ALib C++ Framework
by
Library Version: 2605 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
environment.cpp
1namespace alib { namespace system {
2
3
5 AString& target,
6 lang::CurrentData targetData ) {
7 if ( targetData == lang::CurrentData::Clear )
8 target.Reset();
9
10 if ( name.IsEmpty() )
11 return false;
12
13 ALIB_STRINGS_TO_NARROW( name, nName, 512 )
15 nchar* env= std::getenv( nName );
17
18 if( env != nullptr ) {
19 target._( NString( env ) );
20 return true;
21 }
22 return false;
23}
24
25}} // namespace [alib::system]
#define ALIB_ALLOW_UNSAFE_FUNCTION_OR_VARIABLE
#define ALIB_POP_ALLOWANCE
TAString & _(const TAppendable &src)
constexpr bool IsEmpty() const
Definition string.hpp:349
@ Clear
Chooses to clear existing data.
Definition alox.cpp:14
strings::TString< nchar > NString
Type alias in namespace #"%alib".
Definition string.hpp:2174
strings::TCString< character > CString
Type alias in namespace #"%alib".
Definition cstring.hpp:399
characters::nchar nchar
Type alias in namespace #"%alib".
strings::TAString< character, lang::HeapAllocator > AString
Type alias in namespace #"%alib".
#define ALIB_STRINGS_TO_NARROW( src, dest, bufSize)
static bool Get(const CString &varName, AString &target, lang::CurrentData targetData=lang::CurrentData::Clear)