mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-17 14:39:33 +00:00
global-functions: $CharacterMultiply: use local variables for parameters
This commit is contained in:
parent
7dc230cceb
commit
6990084d98
1 changed files with 5 additions and 2 deletions
|
|
@ -240,9 +240,12 @@
|
||||||
|
|
||||||
# multiply given character(s)
|
# multiply given character(s)
|
||||||
:set CharacterMultiply do={
|
:set CharacterMultiply do={
|
||||||
|
:local Str [ :tostr $1 ];
|
||||||
|
:local Num [ :tonum $2 ];
|
||||||
|
|
||||||
:local Return "";
|
:local Return "";
|
||||||
:for I from=1 to=$2 do={
|
:for I from=1 to=$Num do={
|
||||||
:set Return ($Return . $1);
|
:set Return ($Return . $Str);
|
||||||
}
|
}
|
||||||
:return $Return;
|
:return $Return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue