MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / SubstitueVariables

Function SubstitueVariables

lib/variables/variable-string.cpp:79–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79std::string SubstitueVariables(std::string str)
80{
81 for (const auto &v : GetVariables()) {
82 const auto &variable = std::dynamic_pointer_cast<Variable>(v);
83 const std::string pattern = "${" + variable->Name() + "}";
84 if (ReplaceAll(str, pattern, variable->Value(false))) {
85 variable->MarkAsUsed();
86 }
87 }
88 return str;
89}
90
91} // namespace advss

Callers 1

ResolveMethod · 0.85

Calls 4

ReplaceAllFunction · 0.85
MarkAsUsedMethod · 0.80
NameMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected