terminate() public method

Set the scan pointer to the end of the string and clear matching data.
public terminate ( )
コード例 #1
0
ファイル: StringScannerTest.php プロジェクト: hamlphp/hamlphp
 public function testEos()
 {
     $s = new StringScanner('test string');
     $this->assertFalse($s->eos);
     $s->scan('/test/');
     $this->assertFalse($s->eos);
     $s->terminate();
     $this->assertTrue($s->eos);
 }