Same name in other branches
- 5.0.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getNext()
- 6.0.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getNext()
- 7.x-2.x advagg_js_compress/jshrink.inc \JShrink\Minifier::getNext()
- 8.x-2.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getNext()
- 8.x-3.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getNext()
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.
Parameters
string $string:
Return value
string|false Returns the first character of the string or false.
2 calls to Minifier::getNext()
- Minifier::processMultiLineComments in 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 in advagg_js_minify/
jshrink.inc - Removed one line comments, with the exception of some very specific types of conditional comments.
File
-
advagg_js_minify/
jshrink.inc, line 457
Class
- Minifier
- Minifier
Namespace
JShrinkCode
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);
}