| 488 | } |
| 489 | |
| 490 | String 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 | } |
no test coverage detected