original_string: protected function readUntil($search)
      {
          while (($position = strpos($this->buffer, $search)) === false) {
              if (feof($this->fp)) {
                  fclose($this->fp);
                  throw new DecodeException(
                      "Invalid multipart data encountered; " .
                      "end of content was reached before expected"
                  );
              }
              $this->buffer .= fread($this->fp, $this->bytesPerRead);
          }
          return $position;
      }
code: protected function readUntil($search)
      {
          while (($position = strpos($this->buffer, $search)) === false) {
              if (feof($this->fp)) {
                  fclose($this->fp);
                  throw new DecodeException(
                      "Invalid multipart data encountered; " .
                      "end of content was reached before expected"
                  );
              }
              $this->buffer .= fread($this->fp, $this->bytesPerRead);
          }
          return $position;
      }
code_tokens: protected function readUntil ( $ search ) { while ( ( $ position = strpos ( $ this -> buffer , $ search ) ) === false ) { if ( feof ( $ this -> fp ) ) { fclose ( $ this -> fp ) ; throw new DecodeException ( "Invalid multipart data encountered; " . "end of content was reached before expected" ) ; } $ this -> buffer .= fread ( $ this -> fp , $ this -> bytesPerRead ) ; } return $ position ; }
docstring: Read the input stream into the buffer until a string is encountered
  
  @param string $search The string to read until
  @return int The position of the string in the buffer
  @throws DecodeException
docstring_tokens: Read the input stream into the buffer until a string is encountered