src/TerminalObject/Helper/StringLength.php
protected function pad($str, $final_length, $padding_side = 'right')
    {
        $padding = $final_length - $this->lengthWithoutTags($str);

        if ($padding_side == 'left') {
            return str_repeat(' ', $padding) . $str;
        }

        return $str . str_repeat(' ', $padding);
    }
protected function pad($str, $final_length, $padding_side = 'right')
    {
        $padding = $final_length - $this->lengthWithoutTags($str);

        if ($padding_side == 'left') {
            return str_repeat(' ', $padding) . $str;
        }

        return $str . str_repeat(' ', $padding);
    }
protected function pad ( $ str , $ final_length , $ padding_side = 'right' ) { $ padding = $ final_length - $ this -> lengthWithoutTags ( $ str ) ; if ( $ padding_side == 'left' ) { return str_repeat ( ' ' , $ padding ) . $ str ; } return $ str . str_repeat ( ' ' , $ padding ) ; }
Apply padding to a string

@param string $str
@param string $final_length
@param string $padding_side

@return string
Apply padding to a string