public static function shift(string &$str, string $encoding = null)
    {
        $encoding = $encoding ?: mb_internal_encoding();

        $first = mb_substr($str, 0, 1, $encoding);
        $str = mb_substr($str, 1, null, $encoding);

        return $first;
    }