Leafo\ScssPhp\Compiler::libStrIndex PHP Method

libStrIndex() protected method

protected libStrIndex ( $args )
    protected function libStrIndex($args)
    {
        $string = $this->coerceString($args[0]);
        $stringContent = $this->compileStringContent($string);
        $substring = $this->coerceString($args[1]);
        $substringContent = $this->compileStringContent($substring);
        $result = strpos($stringContent, $substringContent);
        return $result === false ? static::$null : new Node\Number($result + 1, '');
    }
Compiler