mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user