Same name and namespace in other branches
  1. 6.0.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getNext() 1 commentaire
  2. 7.x-2.x advagg_js_compress/jshrink.inc \JShrink\Minifier::getNext() 1 commentaire
  3. 8.x-2.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getNext() 1 commentaire
  4. 8.x-3.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getNext() 1 commentaire
  5. 8.x-4.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getNext() 1 commentaire

Pushes the index ahead to the next instance of the supplied string. If it is found the first character of the string is returned and the index is set to it's position.

Paramètres

string $string:

Return value

string|false Returns the first character of the string or false.

2 calls to Minifier::getNext()
Minifier::processMultiLineComments dans advagg_js_minify/jshrink.inc
Skips multiline comments where appropriate, and includes them where needed. Conditional comments and "license" style blocks are preserved.
Minifier::processOneLineComments dans advagg_js_minify/jshrink.inc
Removed one line comments, with the exception of some very specific types of conditional comments.

Fichier

advagg_js_minify/jshrink.inc, line 457

Classe

Minifier
Minifier

Namespace

JShrink

Code

protected function getNext($string) {
    // Find the next occurrence of "string" after the current position.
    $pos = strpos($this->input, $string, $this->index);
    // If it's not there return false.
    if ($pos === false) {
        return false;
    }
    // Adjust position of index to jump ahead to the asked for string
    $this->index = $pos;
    // Return the first character of that string.
    return substr($this->input, $this->index, 1);
}