You are here

public function InputStream::charsUntil in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/masterminds/html5/src/HTML5/Parser/InputStream.php \Masterminds\HTML5\Parser\InputStream::charsUntil()

Read to a particular match (or until $max bytes are consumed).

This operates on byte sequences, not characters.

Matches as far as possible until we reach a certain set of bytes and returns the matched substring.

Parameters

string $bytes: Bytes to match.

int $max: Maximum number of bytes to scan.

Return value

mixed Index or false if no match is found. You should use strong equality when checking the result, since index could be 0.

See also

strcspn

1 method overrides InputStream::charsUntil()
StringInputStream::charsUntil in vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php
Read to a particular match (or until $max bytes are consumed).

File

vendor/masterminds/html5/src/HTML5/Parser/InputStream.php, line 57

Class

InputStream
Interface for stream readers.

Namespace

Masterminds\HTML5\Parser

Code

public function charsUntil($bytes, $max = null);