libyui
3.0.10
|
#include <YEnvVar.h>
Public Member Functions | |
YEnvVar (const std::string &name=std::string()) | |
std::string | name () const |
bool | isSet () const |
std::string | value () const |
bool | isEqual (const std::string &str, bool caseSensitive=false) const |
bool | operator== (const std::string &str) const |
bool | contains (const std::string &str, bool caseSensitive=false) const |
Helper class to represent an environment variable and its value.
YEnvVar::YEnvVar | ( | const std::string & | name = std::string() | ) |
Constructor: Retrieve the environment variable 'name' and store the value (unless 'name' is empty).
Definition at line 36 of file YEnvVar.cc.
bool YEnvVar::contains | ( | const std::string & | str, |
bool | caseSensitive = false |
||
) | const |
Return 'true' if the environment variable is set and the value contains 'str'.
Definition at line 66 of file YEnvVar.cc.
bool YEnvVar::isEqual | ( | const std::string & | str, |
bool | caseSensitive = false |
||
) | const |
Return 'true' if the environment variable is set and the value is 'str'.
Definition at line 54 of file YEnvVar.cc.
bool YEnvVar::isSet | ( | ) | const [inline] |
std::string YEnvVar::name | ( | ) | const [inline] |
bool YEnvVar::operator== | ( | const std::string & | str | ) | const [inline] |
std::string YEnvVar::value | ( | ) | const [inline] |