You are here

private function Parser::isCurrentLineComment in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Symfony/Component/Yaml/Parser.php \Symfony\Component\Yaml\Parser::isCurrentLineComment()
  2. 7.2 vendor/Symfony/Component/Yaml/Parser.php \Symfony\Component\Yaml\Parser::isCurrentLineComment()

Returns true if the current line is a comment line.

Return value

Boolean Returns true if the current line is a comment line, false otherwise

1 call to Parser::isCurrentLineComment()
Parser::isCurrentLineEmpty in vendor/Symfony/Component/Yaml/Parser.php
Returns true if the current line is blank or if it is a comment line.

File

vendor/Symfony/Component/Yaml/Parser.php, line 542

Class

Parser
Parser parses YAML strings to convert them to PHP arrays.

Namespace

Symfony\Component\Yaml

Code

private function isCurrentLineComment() {

  //checking explicitly the first char of the trim is faster than loops or strpos
  $ltrimmedLine = ltrim($this->currentLine, ' ');
  return $ltrimmedLine[0] === '#';
}