Brimbox Logo Brimbox Version 2.3.4 Released

pad>>

Method that returns padded variables which are used in Brimbox in various scenarios.

Class: bb_main, called as $main

File: bb_main.php (php)

Declaration:

function pad($char, $number, $padlen = 2)

Usage:

$column = $main->pad($char, $number);

Returns: character concatenated with integer left padded to pad length.

Parameter: $char (string, 1 character long)
Character that starts the output string, for instance “c” for columns.

Parameter: $number (integer)
Integer to be padded.

Parameter: $padlen (option integer)
Full length of padded number.

Example:
$column = $main->pad(“c”, 7)
$column equals “c07”

Updated: 2016-07-17