public static function rtrim(string $s, string $charList = self::TRIM_CHARACTERS): string
    {
        $charList = \preg_quote($charList, '#');

        return static::replace($s, '#[' . $charList . ']+\z#u', '');
    }