Rewinds given IOs before and after the block.
546562
def wrap_with_rewind *io, &block
      io.each do |i|
        i.rewind
      end
      yield
      io.each do |i|
        i.rewind
      end
    end
249665
public function rewind()
    {
        $this->index = 0;
        $this->length = null;
        $this->end = false;

        $this->iterator->rewind();

        // Prefetch the next element
        if ($this->iterator->valid()) {
            $this->validOnNext = true;
            $this->prefetch();
        } else {
            $this->validOnNext = false;
        }

        if ($this->uses_groups) {
            // Notify the grouping helper of the change
            $this->groups->reset();
        }
    }
474897
final public function rewind()
    {
        $this->results = null;
        $this->offset = 0;
        $this->total = 0;
        $this->limit = 0;
        $this->position = -1;
    }
1368472
def rewind(self, places):
        '''
        '''
        log.debug("Rewinding pos %d with %d places" % (self.pos, places))
        self.pos -= places
        log.debug("Reset buffer to pos %d" % self.pos)
889575
public function rewind()
    {
        $this->parser->setOffset($this->offset);
        $this->position = -1;
        $this->next();
    }
340538
public function rewind()
    {
        if ($this->step === 0) {
            return;
        }

        $this->stack = [];
        $this->stackType = [];
        $this->valueStack = [];
        $this->errors = [];
        $this->newLine = false;
        $this->first = true;
        $this->line = 1;
        $this->column = 1;
        $this->step = 0;

        $this->processValue($this->initialValue);
    }
28819
def rewind(self, position=0):
        """"""
        if position < 0 or position > len(self._data):
            raise Exception("Invalid position to rewind cursor to: %s." % position)
        self._position = position
137795
public function rewind()
    {
        $ext = $this->fileInfo->getExtension();
        $this->state = 0;
        $this->limit = $this->limit ? $this->limit : (1 << strlen($ext));
        $this->modulo = max((1 << strlen($ext)) - 1, 0);
        $this->ext = null;
        $this->basePath = $this->fileInfo->getPath() . DIRECTORY_SEPARATOR . $this->fileInfo->getBasename($ext);
    }
456095
public function rewind()
    {
        if (0 !== $this->key) {
            $this->key = 0;
            $this->batchKey = 0;
            $this->page = 0;
            $this->response = null;
            $this->fetchNextPage();
        }
    }
1365497
public function rewind()
    {
        try {
            $this->getCursor()->rewind();
        } catch (LogicException $e) {
            $this->fresh();
            $this->getCursor()->rewind();
        }

        $this->position = 0;
    }
1045467
public function rewind() {
        if ($this->iteratorKeys === null) {
            $this->iteratorKeys = \array_keys($this->mapping['properties']);
        }
        $this->iteratorPosition = 0;
    }
683072
public function rewind()
    {
        $this->dataStreams = null;
        $this->currentDataStream = 0;
        foreach ($this->dataStreams() as $dataStream) {
            $dataStream->rewind();
        }
    }
184498
public function rewind()
    {
        if (!($this->inputStream instanceof Seekable)) {
            return;
        }

        $this->inputStream->seek(0, Seekable::SET);
        $this->lineNumber  = 0;
        $this->currentLine = null;
        $this->next();
    }
395888
public function rewind() : void
    {
        $r = false;
        $err = ($this->stream === null || $this->seekable === false);

        if ($err === false) {
            $r = rewind($this->stream);
        }

        if ($err === true || $r === false) {
            // @codeCoverageIgnoreStart
            throw new \RuntimeException("Could not rewind stream.");
            // @codeCoverageIgnoreEnd
        }
    }
975147
public void rewindNbytes(int N)
   {
      int bits = (N << 3);
	  totbit -= bits;
	  buf_byte_idx -= bits;	  
	  if (buf_byte_idx<0)
		  buf_byte_idx += BUFSIZE;
   }
1329815
public function rewind()
    {
        $meta = stream_get_meta_data($this->fp);
        if ($meta['seekable']) {
            rewind($this->fp);
            $this->curLine = 0;
        }
        if ($this->hasHeader) {
            $this->setOption('header', $this->readLine());
        }
        $this->readLine();
    }
234909
public function rewind()
    {
        if ($this->position != $this->initialPosition) {
            $this->position = $this->initialPosition;
            $this->resumptionToken = $this->initialResumptionToken;
            $this->data = array();
            $this->fetchMore();
        }
    }