| 50 | return std::string(buffer); |
| 51 | } |
| 52 | std::string LoadConfigString(const char *pszKey, const char *pszItem, const char *pszDefault) |
| 53 | { |
| 54 | std::string envKey = envKeyName(pszKey, pszItem); |
| 55 | if (char* v = std::getenv(envKey.c_str())) |
| 56 | return v; |
| 57 | else |
| 58 | return LoadConfigStringFromFile(pszKey, pszItem, pszDefault); |
| 59 | } |
| 60 | // this version uppercase result string after loading, should be used for the most of enum-like strings |
| 61 | std::string LoadConfigStringUCase (const char *pszKey, const char *pszItem, const char *pszDefault) |
| 62 | { |
no test coverage detected