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

Breadcrumb

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

function Lexer::getFullUpcomingInput

Return value

string

File

vendor/seld/jsonlint/src/Seld/JsonLint/Lexer.php, line 179

Class

Lexer
Lexer class

Namespace

Seld\JsonLint

Code

public function getFullUpcomingInput() {
    $next = $this->match;
    if (substr($next, 0, 1) === '"' && substr_count($next, '"') === 1) {
        $len = \strlen($this->input);
        if ($len === $this->offset) {
            $strEnd = $len;
        }
        else {
            $strEnd = min(strpos($this->input, '"', $this->offset + 1) ?: $len, strpos($this->input, "\n", $this->offset + 1) ?: $len);
        }
        $next .= substr($this->input, $this->offset, $strEnd - $this->offset);
    }
    elseif (\strlen($next) < 20) {
        $next .= substr($this->input, $this->offset, 20 - \strlen($next));
    }
    return $next;
}
RSS feed
Powered by Drupal