Supported Versions: PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8
Pad a string to a certain length with another string
<?php str_pad(    string $string,    int $length,    string $pad_string = " ",    int $pad_type = STR_PAD_RIGHT): string
<?php     private function padColumn(string $text, int $width)

    {

        $ansiCharacterPadding = strlen($text) - strlen($this->stripAnsi($text));

        return str_pad($text, $width + $ansiCharacterPadding);

    }



    private function stripAnsi(string $text): string
<?php function ansi(int $code)

{

    $code = str_pad($code, 3, 0, STR_PAD_LEFT);

    return "\x1b[{$code}m";

}