View Source Ext.Random (ext v1.4.0)

Ext.Random provides helper functions to produce random values. Note that these functions are not suitable for cryptographic use.

Summary

Functions

Returns a random alphanumeric (a-z, A-Z, 0-9) string of the specified length. The characters are chosen with replacement.

Returns a random codepoint from the input string.

Functions

alphanumeric(count)

@spec alphanumeric(number()) :: binary()

Returns a random alphanumeric (a-z, A-Z, 0-9) string of the specified length. The characters are chosen with replacement.

sample(str)

@spec sample(binary()) :: binary()

Returns a random codepoint from the input string.