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

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

        return $this;
    }
Strip whitespace (or other characters) from the beginning and end of a string

@param string $charList Optionally, the stripped characters can also be specified using the charlist parameter.
Simply list all characters that you want to be stripped. With .. you can specify a range of characters.

@return Text