Skip to content

Commit 8f32887

Browse files
committed
global-functions: introduce $GetRandom20CharAlNum
1 parent ff0b05e commit 8f32887

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

global-functions

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
:global EscapeForRegEx;
2929
:global FlushEmailQueue;
3030
:global GetMacVendor;
31+
:global GetRandom20CharAlNum;
3132
:global GetRandom20CharHex;
3233
:global GetRandomNumber;
3334
:global HexToNum;
@@ -400,6 +401,13 @@
400401
}
401402
}
402403

404+
# generate random 20 chars alphabetical (A-Z & a-z) and numerical (0-9)
405+
:set GetRandom20CharAlNum do={
406+
:global EitherOr;
407+
408+
:return [ :rndstr length=[ $EitherOr [ :tonum $1 ] 20 ] from="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ];
409+
}
410+
403411
# generate random 20 chars hex (0-9 and a-f)
404412
:set GetRandom20CharHex do={
405413
:global EitherOr;

0 commit comments

Comments
 (0)