Get a Demo
Table of contents

random_string

The random_string function returns a string containing a random series of uppercase and/or lowercase letters and/or numbers at the specified length. If no length is specified then the string will be 8 characters long.

This function is unique to Aptuitiv. It is not part of the core Twig functionality.
{{ random_string(3) }}

{# Returns a string that is 3 characters long #}

Arguments Link

The random_string function has the following signature.

random_string(length)
Argument Description
length

The number of characters that the returned value should be.

If it is not set then the returned value will be 8 characters long.
Get Started With Aptuitiv