PHPHtmlParser\Content::char PHP 메소드

char() 공개 메소드

Gets the current character we are at.
public char ( integer $char = null ) : string
$char integer
리턴 string
    public function char($char = null)
    {
        $pos = $this->pos;
        if (!is_null($char)) {
            $pos = $char;
        }
        if (!isset($this->content[$pos])) {
            return '';
        }
        return $this->content[$pos];
    }

Usage Example

예제 #1
0
 public function testSkipByToken()
 {
     $content = new Content(' b c');
     $content->fastForward(1);
     $content->skipByToken('blank');
     $this->assertEquals('b', $content->char());
 }
All Usage Examples Of PHPHtmlParser\Content::char