static function TrimRight($string, $chars = null)
    {
        self::InitEncoding();
        if (!$chars)
            return rtrim($chars);

        return rtrim($string, $chars);
    }
static function TrimRight($string, $chars = null)
    {
        self::InitEncoding();
        if (!$chars)
            return rtrim($chars);

        return rtrim($string, $chars);
    }
static function TrimRight ( $ string , $ chars = null ) { self :: InitEncoding ( ) ; if ( ! $ chars ) return rtrim ( $ chars ) ; return rtrim ( $ string , $ chars ) ; }
Trims trailing chars.
@param string $string
@param string $chars
@return string The trimmed string
Trims trailing chars .