str_pad plugin
This function enables you to add ‘leading characters’ so your string would be exactly the length you need.
The only thing it does it utilizing PHP str_pad function, so refer to it’s documentation for into about options.
http://php.net/manual/en/function.str-pad.php
Example usage:
{exp:str_pad input="{my_number_custom_field}" pad_length="5" pad_string="0" pad_type="STR_PAD_LEFT"}
pad_type parameter is optional and defaults to STR_PAD_RIGHT
For support, please email .(JavaScript must be enabled to view this email address).
Comments are closed. To get support, email .(JavaScript must be enabled to view this email address).


Comments