public function setDelimiter(string $delimiter): self
    {
        if ($delimiter === $this->delimiter) {
            return $this;
        }

        if (1 === strlen($delimiter)) {
            $this->delimiter = $delimiter;
            $this->resetProperties();

            return $this;
        }

        throw new Exception(sprintf('%s() expects delimiter to be a single character %s given', __METHOD__, $delimiter));
    }
public function setDelimiter(string $delimiter): self
    {
        if ($delimiter === $this->delimiter) {
            return $this;
        }

        if (1 === strlen($delimiter)) {
            $this->delimiter = $delimiter;
            $this->resetProperties();

            return $this;
        }

        throw new Exception(sprintf('%s() expects delimiter to be a single character %s given', __METHOD__, $delimiter));
    }
public function setDelimiter ( string $ delimiter ) : self { if ( $ delimiter === $ this -> delimiter ) { return $ this ; } if ( 1 === strlen ( $ delimiter ) ) { $ this -> delimiter = $ delimiter ; $ this -> resetProperties ( ) ; return $ this ; } throw new Exception ( sprintf ( '%s() expects delimiter to be a single character %s given' , __METHOD__ , $ delimiter ) ) ; }
Sets the field delimiter.

@throws Exception If the Csv control character is not one character only.

@return static
Sets the field delimiter .