Box\Spout\Writer\Common\Sheet::doesStartOrEndWithSingleQuote PHP Method

doesStartOrEndWithSingleQuote() protected method

Returns whether the given name starts or ends with a single quote
protected doesStartOrEndWithSingleQuote ( string $name ) : boolean
$name string
return boolean TRUE if the name starts or ends with a single quote, FALSE otherwise.
    protected function doesStartOrEndWithSingleQuote($name)
    {
        $startsWithSingleQuote = $this->stringHelper->getCharFirstOccurrencePosition('\'', $name) === 0;
        $endsWithSingleQuote = $this->stringHelper->getCharLastOccurrencePosition('\'', $name) === $this->stringHelper->getStringLength($name) - 1;
        return $startsWithSingleQuote || $endsWithSingleQuote;
    }