zeroPad() public static method

Pads a given string with zeroes on the left.
public static zeroPad ( integer $number, integer $length ) : string
$number integer The number to pad
$length integer The total length of the desired string
return string
Ejemplo n.º 1
0
 public function testZeroPad()
 {
     is('341', Str::zeroPad('0341', 1));
     is('341', Str::zeroPad(341, 3));
     is('0341', Str::zeroPad(341, 4));
     is('000341', Str::zeroPad(341, 6));
 }