MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / expand_value

Function expand_value

app/workflow/workflow.cpp:126–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124 while ((pos = text.find(from, pos)) != std::string::npos) {
125 text.replace(pos, from.size(), to);
126 pos += to.size();
127 }
128 return text;
129}
130
131std::string expand_value(std::string value, const WorkflowContext & context) {
132 value = replace_all(value, "${out_dir}", context.output_dir.string());
133 value = replace_all(value, "${workflow_dir}", context.workflow_dir.string());
134 for (const auto & [key, item] : context.values) {
135 value = replace_all(value, "${" + key + "}", item);
136 }

Callers 4

resolve_workflow_pathFunction · 0.85
load_workflow_inputsFunction · 0.85
expanded_jsonFunction · 0.85
merged_optionsFunction · 0.85

Calls 1

replace_allFunction · 0.70

Tested by

no test coverage detected