public function setSource($source)
    {
        $this->source = $source;
        $this->length = mb_strlen($source);
        $this->head = 0;
        $this->last= 0;
        $this->captures = array();
        $this->match = null;
        $this->reset();

        return $this;
    }
public function setSource($source)
    {
        $this->source = $source;
        $this->length = mb_strlen($source);
        $this->head = 0;
        $this->last= 0;
        $this->captures = array();
        $this->match = null;
        $this->reset();

        return $this;
    }
public function setSource ( $ source ) { $ this -> source = $ source ; $ this -> length = mb_strlen ( $ source ) ; $ this -> head = 0 ; $ this -> last = 0 ; $ this -> captures = array ( ) ; $ this -> match = null ; $ this -> reset ( ) ; return $ this ; }
Sets the source string.

@param string $source The source string

@return StringScanner The StringScanner object
Sets the source string .