ascii - ASCII characters
This function generates random characters in the ASCII character-encoding scheme originally based on the English alphabet.
Only printable ASCII characters will be returned (no control characters).
This function is best suited to generate salts, authorisation keys, passwords, etc.
ASCII() function behaves similar to the javascript String.fromCharCode() or php's char() function.
Source: Wikipedia: American Standard Code for Information Interchange
Usage(s)
ascii () |
Returns one random ASCII character in the range 32 to 126 |
ascii ( $decimal ) |
Returns a string of random ASCII characters with length $length |
ascii ( $minimum , $maximum ) |
Returns a string of ASCII characters with a string length in the range $minimum to $maximum |
Parameter(s)
$decimal |
The Unicode decimal value to be converted into ASCII |
$minimum |
The minimum length for the string of characters. |
$maximum |
The maximum length for the string of characters. |
Example(s)
Generating some random ASCII art
ascii(50,50)
hLwD&K_x*":HVkAvJ'2j6~CQrh/MZ 5j1Wdy3h~^U~NL'T:5K_
w1-cxwoIrVZm<=y)_wd*W/9x1g8].aD*~M^6w{V-@-s>b)cj<<
#QizIj[|zEqN8F*2`a0+J4v$,US=`(1):fY1O$ZtUf1L-i?fJN
B/BFqbQZsqm:M:[>+6m^[-LQQ-#nN1Al%im;v*V[xYtB))b@4X
"bKgcH(g,zW;M2m]pB l\:ttt=?iI]oIy@=Q7Vf\=2JXyYH*dh
7:0 .hW:OP*4DJNmN-5[GqO{Fam6}r5L(fkGkB4I ch}iM#uE'
|qr1;Z(/G8lo<"#q|no9'xdJT*8E Vi1'+J[Bxk/ z(8]zMY:^
l;\?6 3p3+dZcj9C]w2L)Q6 ZWtPsAgK=%\>+hL#D$wUT6,#'p
cvls[c2&]_OTsDk@H~XFIHky7a{@WUb]9:'ky=0Hf`Pc,hv%fw
>nnIiE#(]<`Q|M =yGrb1S< M>Jq-9WWCgz#EJPvPB7wyyXiO^
RnFi+IC23Qd% mE~vkI<[q`t@.O/u0HWF2=\FG|5.GZfbM`5+:
HG2%u[_JOCot3]x,@y`w.09Y_4QWW4 @R\w^:q+vKKJ"g"--5l
_5x~~vHKjC4egxJp^)A(ZRW,FBt9ja[2%ePJ[B8DP=ssVyM%+&
\ij0V.uR:\TUBHfi-wf_MXi0noAxy2Bu1>qg_3Eh&emIjq&,33
ojuA#C`>nRQc|]CI:>d_s'!R)PdGDY8c[0rV?[$@R$xb1`rkc`
5`;-{)CNv{]1$?XCy/xTVQc:CkDT]sFlEs:J%[!ffA\JTUZq59
WFHob'w%1?REodeb6(T|O.gw0GT.^usRf4;*|N?@z'bU{Yut;V
|
See also
char - alphabetical character
string - string of alphabetical characters
unicode - unicode characters