src/UI/Drawer.php
public function fitText($width, $text = '', $padding = 0)
    {
        $spaces = $width - strlen($text) - $padding;

        return $text . str_repeat(' ', $spaces < 0 ? 0 : $spaces);
    }
public function fitText($width, $text = '', $padding = 0)
    {
        $spaces = $width - strlen($text) - $padding;

        return $text . str_repeat(' ', $spaces < 0 ? 0 : $spaces);
    }
public function fitText ( $ width , $ text = '' , $ padding = 0 ) { $ spaces = $ width - strlen ( $ text ) - $ padding ; return $ text . str_repeat ( ' ' , $ spaces < 0 ? 0 : $ spaces ) ; }
Append spaces to the string to fit the whole terminal window

@param int    $width
@param string $text
@param int    $padding

@return string
Append spaces to the string to fit the whole terminal window