english/libraries/joomla/utilities/string.php
/**
	 * UTF-8 aware replacement for rtrim()
	 * Strip whitespace (or other characters) from the end of a string
	 * You only need to use this if you are supplying the charlist
	 * optional arg and it contains UTF-8 characters. Otherwise rtrim will
	 * work normally on a UTF-8 string
	 *
	 * @param   string  $str       The string to be trimmed
	 * @param   string  $charList  The optional charlist of additional characters to trim
	 *
	 * @return  string  The trimmed string
	 *
	 * @see     http://www.php.net/rtrim
	 * @since   11.1
	 */
UTF-8 aware replacement for rtrim()
Strip whitespace (or other characters) from the end of a string
You only need to use this if you are supplying the charlist
optional arg and it contains UTF-8 characters. Otherwise rtrim will
work normally on a UTF-8 string

@param   string  $str       The string to be trimmed
@param   string  $charList  The optional charlist of additional characters to trim

@return  string  The trimmed string


UTF - 8 aware replacement for rtrim () Strip whitespace ( or other characters ) from the end of a string You only need to use this if you are supplying the charlist optional arg and it contains UTF - 8 characters . Otherwise rtrim will work normally on a UTF - 8 string @param string $str The string to be trimmed @param string $charList The optional charlist of additional characters to trim @return string The trimmed string
public static function rtrim($str, $charlist = FALSE)
	{
		if (empty($charlist) && $charlist !== false) {
			return $str;
		}
		jimport('phputf8.trim');
		if ( $charlist === FALSE ) {
			return utf8_rtrim($str);
		} else {
			return utf8_rtrim( $str, $charlist );
		}
	}
public static function rtrim ( $ str , $ charlist = FALSE ) { if ( empty ( $ charlist ) && $ charlist !== false ) { return $ str ; } jimport ( 'phputf8.trim' ) ; if ( $ charlist === FALSE ) { return utf8_rtrim ( $ str ) ; } else { return utf8_rtrim ( $ str , $ charlist ) ; } }
UTF-8 aware replacement for rtrim()
 Strip whitespace (or other characters) from the end of a string
 You only need to use this if you are supplying the charlist
 optional arg and it contains UTF-8 characters.
UTF - 8 aware replacement for rtrim () Strip whitespace ( or other characters ) from the end of a string You only need to use this if you are supplying the charlist optional arg and it contains UTF - 8 characters .