aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-12-04 10:56:48 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-12-04 11:22:36 +0100
commit8f24b4c490ddb4404521feed8a579a34351568f5 (patch)
tree7804459928f2392aef444e1b09f33d1c27e80fca /global-functions.rsc
parent15e347303bfb1d8dc600dd8c1a6cd6e8bbe6268f (diff)
global-functions: introduce $CharacterMultiply
Diffstat (limited to 'global-functions.rsc')
-rw-r--r--global-functions.rsc10
1 files changed, 10 insertions, 0 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 6167348..bb4f098 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -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 ];