Kraken\Util\Buffer\BufferInterface::remove PHP Method

remove() public method

Remove and return the given number of characters (at most) from the buffer.
public remove ( integer $length, integer $offset ) : string
$length integer
$offset integer
return string
    public function remove($length, $offset = 0);

Usage Example

Beispiel #1
0
 public function testApiRemove_RemovesAndReturnsValidData_WhenInvalidOffsetIsPassed()
 {
     $length = 10;
     $offset = -1;
     $result = $this->buffer->remove($length, $offset);
     $this->assertSame(substr($this->initialString, 0, $length), $result);
     $this->assertSame(substr($this->initialString, $length), (string) $this->buffer);
 }
All Usage Examples Of Kraken\Util\Buffer\BufferInterface::remove