Same name in other branches
- 5.0.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getChar()
- 6.0.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getChar()
- 7.x-2.x advagg_js_compress/jshrink.inc \JShrink\Minifier::getChar()
- 8.x-2.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getChar()
- 8.x-3.x advagg_js_minify/jshrink.inc \JShrink\Minifier::getChar()
Returns the next string for processing based off of the current index.
Return value
string
5 calls to Minifier::getChar()
- Minifier::getReal dans advagg_js_minify/
jshrink.inc - This function gets the next "real" character. It is essentially a wrapper around the getChar function that skips comments. This has significant performance benefits as the skipping is done using native functions (ie, c code) rather than in script php.
- 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.
- Minifier::saveRegex dans advagg_js_minify/
jshrink.inc - When a regular expression is detected this function crawls for the end of it and saves the whole regex.
- Minifier::saveString dans advagg_js_minify/
jshrink.inc - When a javascript string is detected this function crawls for the end of it and saves the whole string.
Fichier
-
advagg_js_minify/
jshrink.inc, line 305
Classe
- Minifier
- Minifier
Namespace
JShrinkCode
protected function getChar() {
// Check to see if we had anything in the look ahead buffer and use that.
if (isset($this->c)) {
$char = $this->c;
unset($this->c);
// Otherwise we start pulling from the input.
}
else {
$char = substr($this->input, $this->index, 1);
// If the next character doesn't exist return false.
if (isset($char) && $char === false) {
return false;
}
// Otherwise increment the pointer and use this char.
$this->index++;
}
// Normalize all whitespace except for the newline character into a
// standard space.
if ($char !== "\n" && ord($char) < 32) {
return ' ';
}
return $char;
}