Ferno\Loco\Charclass::__toString PHP Méthode

__toString() public méthode

This is all a bit naive but it gives you the general picture
public __toString ( )
    public function __toString()
    {
        if (count($this->chars) === 0) {
            if ($this->negateMe) {
                return ".";
            }
            throw new Exception("What");
        }
        if (count($this->chars) === 1 && $this->negateMe === false) {
            return $this->chars[0];
        }
        if ($this->negateMe) {
            return "[^" . implode("", $this->chars) . "]";
        }
        return "[" . implode("", $this->chars) . "]";
    }