mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-29 14:28:16 +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 CertificateAvailable;
|
||||||
:global CertificateDownload;
|
:global CertificateDownload;
|
||||||
:global CertificateNameByCN;
|
:global CertificateNameByCN;
|
||||||
|
:global CharacterMultiply;
|
||||||
:global CharacterReplace;
|
:global CharacterReplace;
|
||||||
:global CleanFilePath;
|
:global CleanFilePath;
|
||||||
:global DeviceInfo;
|
:global DeviceInfo;
|
||||||
|
@ -172,6 +173,15 @@
|
||||||
name=[ $CharacterReplace [ $CharacterReplace [ $CharacterReplace $CommonName "'" "-" ] " " "-" ] "---" "-" ];
|
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
|
# character replace
|
||||||
:set CharacterReplace do={
|
:set CharacterReplace do={
|
||||||
:local String [ :tostr $1 ];
|
:local String [ :tostr $1 ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue