MCPcopy Create free account
hub / github.com/beefytech/Beef / DoStringReplace

Method DoStringReplace

IDEHelper/DebugVisualizers.cpp:490–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490String DebugVisualizers::DoStringReplace(const StringImpl& origStr, const Array<String>& wildcardCaptures)
491{
492 String newString = origStr;
493 for (int i = 0; i < (int)newString.length(); i++)
494 {
495 if ((newString[i] == '$') && (newString[i + 1] == 'T'))
496 {
497 int wildcardIdx = (int)newString[i + 2] - '1';
498 if ((wildcardIdx >= 0) && (wildcardIdx < (int)wildcardCaptures.size()))
499 {
500 newString = newString.Substring(0, i) + wildcardCaptures[wildcardIdx] + newString.Substring(i + 3);
501 i += 2;
502 }
503 }
504 }
505 return newString;
506}

Callers 8

VisitMethod · 0.80
EvalConditionMethod · 0.80
DbgTypedValueToStringMethod · 0.80
EvalConditionMethod · 0.80
TypedValueToStringMethod · 0.80

Calls 3

SubstringMethod · 0.80
lengthMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected