mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $CharacterReplace: use same condition in loop
This commit is contained in:
@ -51,7 +51,7 @@
|
|||||||
:return $String;
|
:return $String;
|
||||||
}
|
}
|
||||||
|
|
||||||
:while ($String ~ $ReplaceFrom) do={
|
:while ([ :typeof [ :find $String $ReplaceFrom ] ] != "nil") do={
|
||||||
:local Pos [ :find $String $ReplaceFrom ];
|
:local Pos [ :find $String $ReplaceFrom ];
|
||||||
:set Return ($Return . [ :pick $String 0 $Pos ] . $ReplaceWith);
|
:set Return ($Return . [ :pick $String 0 $Pos ] . $ReplaceWith);
|
||||||
:set String [ :pick $String ($Pos + $Len) 999 ];
|
:set String [ :pick $String ($Pos + $Len) 999 ];
|
||||||
|
Reference in New Issue
Block a user