public static function padLeft(string $s, int $length, string $pad = ' '): string
    {
        $length -= \mb_strlen($s);
        if ($length <= 0) {
            return $s;
        }

        $padLen = \mb_strlen($pad);

        return \str_repeat($pad, (int) ($length / $padLen)) . \mb_substr($pad, 0, $length % $padLen) . $s;
    }