insert() public method

Insert the string at the given position in the buffer.
public insert ( string $string, integer $position )
$string string
$position integer
Example #1
0
 public function testApiInsert_InsertsDataAtProperPosition()
 {
     $position = 10;
     $this->buffer->insert($this->appendString, $position);
     $this->assertSame(substr($this->initialString, 0, $position) . $this->appendString . substr($this->initialString, $position), (string) $this->buffer);
 }