Available in all subroutines.

Returns a random string of length len containing characters from the supplied string characters.

This does not use secure random functions and should not be used for cryptographic purposes.

This function is not prefixed with the std. namespace.


set req.http.X-RandomHexNum = randomstr(8, "1234567890abcdef");

User contributed notes

We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.