(cherry picked from commit 84db658eb4)
This commit is contained in:
Arne Döring
2018-10-31 10:44:44 +01:00
committed by narimiran
parent e214241bd3
commit 899ce95420

View File

@@ -1722,7 +1722,7 @@ proc multiReplace*(s: string, replacements: varargs[(string, string)]): string {
# Assume most chars in s are not candidates for any replacement operation
if s[i] in fastChk:
for sub, by in replacements.items:
if sub.len > 0 and s.continuesWith(sub[0], i):
if sub.len > 0 and s.continuesWith(sub, i):
add result, by
inc(i, sub.len)
break sIteration