aboutsummaryrefslogtreecommitdiffstats
path: root/ydb/public/sdk/cpp/client/impl/ydb_internal/common/getenv.cpp
blob: 6781852b53a030a1345c214823c66e65b8deb843 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#include "getenv.h"

#include <stdlib.h>

namespace NYdb {

TStringType GetStrFromEnv(const char* envVarName, const TStringType& defaultValue) {
    auto envVarPointer = getenv(envVarName);
    return envVarPointer ? TStringType(envVarPointer) : defaultValue;
}

} // namespace NYdb