From 16f04ee7ee83755b7405835d343f9e056986173b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 16 Jul 2019 12:46:33 +0200 Subject: global-functions: $CharacterReplace: use same condition in loop --- global-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-functions b/global-functions index f6d1e70..b8afcd4 100644 --- a/global-functions +++ b/global-functions @@ -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 ]; -- cgit v1.2.3-54-g00ecf