private static function mb_fill_string(string $pattern, $length, $encoding = 'UTF-8'): string
    {
        $pattern_length = mb_strlen($pattern, $encoding);
        $str = '';
        $i = 0;
        while ($i < $length) {
            if ($length - $i >= $pattern_length) {
                $str .= $pattern;
                $i += $pattern_length;
            } else {
                $str .= mb_substr($pattern, 0, $length - $i, $encoding);
                break;
            }
        }
        return $str;
    }