src/Ciconia/Common/Text.php
public function rtrim($charList = null)
    {
        if (is_null($charList)) {
            $this->text = rtrim($this->text);
        } else {
            $this->text = rtrim($this->text, $charList);
        }

        return $this;
    }
public function rtrim($charList = null)
    {
        if (is_null($charList)) {
            $this->text = rtrim($this->text);
        } else {
            $this->text = rtrim($this->text, $charList);
        }

        return $this;
    }
public function rtrim ( $ charList = null ) { if ( is_null ( $ charList ) ) { $ this -> text = rtrim ( $ this -> text ) ; } else { $ this -> text = rtrim ( $ this -> text , $ charList ) ; } return $ this ; }
Strip whitespace (or other characters) from the end of a string

@param string $charList You can also specify the characters you want to strip, by means of the charlist parameter.
Simply list all characters that you want to be stripped. With .. you can specify a range of characters.

@return Text
Strip whitespace ( or other characters ) from the end of a string