protected function pad($string, $len)
    {
        $strlen = $this->strlen($string);
        if ($strlen > $len) return $string;

        $pad = $len - $strlen;
        return $string . str_pad('', $pad, ' ');
    }
protected function pad($string, $len)
    {
        $strlen = $this->strlen($string);
        if ($strlen > $len) return $string;

        $pad = $len - $strlen;
        return $string . str_pad('', $pad, ' ');
    }
protected function pad ( $ string , $ len ) { $ strlen = $ this -> strlen ( $ string ) ; if ( $ strlen > $ len ) return $ string ; $ pad = $ len - $ strlen ; return $ string . str_pad ( '' , $ pad , ' ' ) ; }
Pad the given string to the correct length

@param string $string
@param int $len
@return string
Pad the given string to the correct length