function Parser::lexUnquotedString
1 call to Parser::lexUnquotedString()
- Parser::lexInlineStructure in vendor/
symfony/ yaml/ Parser.php
File
-
vendor/
symfony/ yaml/ Parser.php, line 1165
Class
- Parser
- Parser parses YAML strings to convert them to PHP arrays.
Namespace
Symfony\Component\YamlCode
private function lexUnquotedString(int &$cursor) : string {
$offset = $cursor;
$cursor += strcspn($this->currentLine, '[]{},: ', $cursor);
if ($cursor === $offset) {
throw new ParseException('Malformed unquoted YAML string.');
}
return substr($this->currentLine, $offset, $cursor - $offset);
}