reset

Synopsis

reset([$handle])

resets this IO stream back to the last &mark

Parameters

$handle - the handle to reset the mark for

Examples

$buffer = allocate(); writeb($buffer, "this.is.an.example"); closef($buffer); println("Read: " . readb($buffer, 4)); mark($buffer); println("Read: " . readb($buffer, 4)); reset($buffer); println("Read: " . readb($buffer, -1));

Read: this Read: .is. Read: .is.an.example

See Also