aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--global-functions2
1 files changed, 1 insertions, 1 deletions
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 ];