random string, random letters
This function creates a string containing random upper-case characters from A..Z and digits 0..9. The function random letters generates strings with upper-case characters from A..Z only.
Indirect parameter passing is disabled
1-2
No. | Type | Description |
---|---|---|
1 input |
numeral | character count Specifies the number of random characters in the string. |
Opt. 2 input |
numeral | number of output strings to generate If this 2nd function parameter is specified, then the generated strings are returned in a set. An empty set is specified if the value is 0 or negative. |
Type | Description |
---|---|
string set |
Generated random string(s) In case the 2nd function parameter with a string count is specified, then a set containing the strings will be returned. |
Invalid character code (outside 0 - 1114111 range)
for (i[] = 1, i[] <= 5, i[]++)
{
echo( random string( 10 ), " ", random letters( 10 ) );
}
echo( random string( 5, 5 ) ); // 5 strings returned in a set
LT7O4OGDFE RUPEETODWI
AFL0YBT6ZO JDTOSJXSLB
OAVWRAVMQ4 HCPTCQRHYB
AFAVRCVP36 FKYCMWUNLO
4VHX2SM1OI GTSKUVJJLL
{'Q7523','5TIX3','JK6ZP','4RS08','SAZRA'}