Commit 16f04ee7 authored by Christian Hesse's avatar Christian Hesse

global-functions: $CharacterReplace: use same condition in loop

parent b1b53e3d
......@@ -51,7 +51,7 @@
:return $String;
}
:while ($String ~ $ReplaceFrom) do={
:while ([ :typeof [ :find $String $ReplaceFrom ] ] != "nil") do={
:local Pos [ :find $String $ReplaceFrom ];
:set Return ($Return . [ :pick $String 0 $Pos ] . $ReplaceWith);
:set String [ :pick $String ($Pos + $Len) 999 ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment