Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. InputStream.php

function InputStream::charsWhile

Returns the string so long as $bytes matches.

Matches as far as possible with a certain set of bytes and returns the matched substring.

Parameters

string $bytes A mask of bytes to match. If ANY byte in this mask matches the: current char, the pointer advances and the char is part of the substring.

int $max The max number of chars to read.:

See also

strspn

1 method overrides InputStream::charsWhile()
StringInputStream::charsWhile in vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php
Returns the string so long as $bytes matches.

File

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

Class

InputStream
Interface for stream readers.

Namespace

Masterminds\HTML5\Parser

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal