Scans one character and returns it. This method is multibyte character sensitive.
public getch ( ) |
public function testGetch() { $s = new StringScanner("ab"); $this->assertEquals('a', $s->getch()); $this->assertEquals('b', $s->getch()); $this->assertNull($s->getch()); $s = new StringScanner("¢", "utf-8"); $this->assertEquals("¢", $s->getch()); $this->assertNull($s->getch()); }