mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-04 10:14:31 +02:00
global-functions: introduce $CharacterMultiply
This commit is contained in:
parent
15e347303b
commit
8f24b4c490
1 changed files with 10 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
:global CertificateAvailable;
|
||||
:global CertificateDownload;
|
||||
:global CertificateNameByCN;
|
||||
:global CharacterMultiply;
|
||||
:global CharacterReplace;
|
||||
:global CleanFilePath;
|
||||
:global DeviceInfo;
|
||||
|
@ -172,6 +173,15 @@
|
|||
name=[ $CharacterReplace [ $CharacterReplace [ $CharacterReplace $CommonName "'" "-" ] " " "-" ] "---" "-" ];
|
||||
}
|
||||
|
||||
# multiply given character(s)
|
||||
:set CharacterMultiply do={
|
||||
:local Return "";
|
||||
:for I from=1 to=$2 do={
|
||||
:set Return ($Return . $1);
|
||||
}
|
||||
:return $Return;
|
||||
}
|
||||
|
||||
# character replace
|
||||
:set CharacterReplace do={
|
||||
:local String [ :tostr $1 ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue