original_string: public function addWorksheet($title)
      {
          $worksheet = $this->workbook->appendChild($this->createElement('Worksheet'));
          $title = preg_replace("/[\\\|:|\/|\?|\*|\[|\]]/", "", $title);
          $title = substr($title, 0, 31);
          $worksheet->setAttribute('ss:Name', $title);
          $worksheet->table = $worksheet->appendChild($this->createElement('Table'));
          $this->worksheets[md5($title)] = $worksheet;
          return $worksheet;
      }
code: public function addWorksheet($title)
      {
          $worksheet = $this->workbook->appendChild($this->createElement('Worksheet'));
          $title = preg_replace("/[\\\|:|\/|\?|\*|\[|\]]/", "", $title);
          $title = substr($title, 0, 31);
          $worksheet->setAttribute('ss:Name', $title);
          $worksheet->table = $worksheet->appendChild($this->createElement('Table'));
          $this->worksheets[md5($title)] = $worksheet;
          return $worksheet;
      }
code_tokens: public function addWorksheet ( $ title ) { $ worksheet = $ this -> workbook -> appendChild ( $ this -> createElement ( 'Worksheet' ) ) ; $ title = preg_replace ( "/[\\\|:|\/|\?|\*|\[|\]]/" , "" , $ title ) ; $ title = substr ( $ title , 0 , 31 ) ; $ worksheet -> setAttribute ( 'ss:Name' , $ title ) ; $ worksheet -> table = $ worksheet -> appendChild ( $ this -> createElement ( 'Table' ) ) ; $ this -> worksheets [ md5 ( $ title ) ] = $ worksheet ; return $ worksheet ; }
docstring: Adds a new worksheet to the workbook
  @param string $title
  @return DOMElement The worksheet itself
docstring_tokens: Adds a new worksheet to the workbook