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

pop() public method

Remove the given number of characters (at most) from the buffer starting at the end.
public pop ( integer $length ) : string
$length integer
return string
    public function pop($length);

Usage Example

Beispiel #1
0
 public function testApiPop_ReturnsEmptyString_WhenInvalidLengthIsPassed()
 {
     $length = -1;
     $result = $this->buffer->pop($length);
     $this->assertSame('', $result);
     $this->assertSame($this->initialString, (string) $this->buffer);
 }