public function toString(bool $urldecoded = true) : string
    {
        $str = $this->name . "=" . $this->getValue($urldecoded) . ";";

        if ($this->expires !== null) {
            $str .= " Expires=" . $this->getStrExpires() . ";";
        }
        if ($this->domain !== null) {
            $str .= " Domain=" . $this->domain . ";";
        }
        if ($this->path !== null) {
            $str .= " Path=" . $this->path . ";";
        }
        if ($this->secure !== null) {
            $str .= " Secure;";
        }
        if ($this->httpOnly !== null) {
            $str .= " HttpOnly;";
        }

        return $str;
    }