Go to the documentation of this file.
13 constexpr
size_t numSubstitutes = 3;
14 char *envSubstitutes[numSubstitutes][2] = {
15 {
"$OCVARROOT", getenv(
"OCVARROOT")},
16 {
"$OCDATAROOT", getenv(
"OCDATAROOT")},
17 {
"$OCSSWROOT", getenv(
"OCSSWROOT")}
20 for(
size_t sub = 0; sub < numSubstitutes; sub++) {
21 if(envSubstitutes[sub][1] ==
NULL)
24 while((
pos =
str.find(envSubstitutes[sub][1])) != std::string::npos) {
25 str.replace(
pos, strlen(envSubstitutes[sub][1]), envSubstitutes[sub][0]);
void replaceOCroots(std::string &str)
char * strdup(const char *)
char * replace_ocroots(const char *inStr)