[sp_string_random]
is a Lasso 9 method that returns a string of random alphanumeric characters. It accepts an optional integer parameter representing the length of the string to be returned. By default, twenty characters are returned.
sp_string_random
'<br />'
sp_string_random(30)
=>
l3ge2kgkMwG8TaHyitdj
wX5gpPH68nQY80CsC2qs6BnWATC7hJ
Install the file sp_string_random.lasso
where you think is best. Place it either in your Lasso Server's or Site's LassoStartup
or LassoLibraries
directory, restarting the appropriate scope as needed, or include it in the page that calls the methods. I recommend Lasso Site LassoStartup
.