Skip to content

str_pad plugin

24 Oct 2010

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).

Changelog RSS

Licensing & support terms

Attachment

About

    Hello, my name is Yuri and I specialize in creating custom add-ons (plugins, modules, extensions) for ExpressionEngine CMS.
    You can reach me anytime by emailing .(JavaScript must be enabled to view this email address)