You are here

private function CSSmin::indexOf in Advanced CSS/JS Aggregation 7.2

PHP port of Javascript's "indexOf" function for strings only Author: Tubal Martin

Parameters

string $haystack:

string $needle:

int $offset index (optional):

Return value

int

3 calls to CSSmin::indexOf()
CSSmin::minify in advagg_css_compress/yui/CSSMin.inc
Minifies the given input CSS string
CSSmin::processDataUrls in advagg_css_compress/yui/CSSMin.inc
Searches & replaces all data urls with tokens before we start compressing, to avoid performance issues running some of the subsequent regexes against large string chunks.
CSSmin::shortenHexColors in advagg_css_compress/yui/CSSMin.inc
Compresses HEX color values of the form #AABBCC to #ABC or short color name.

File

advagg_css_compress/yui/CSSMin.inc, line 1173

Class

CSSmin

Code

private function indexOf($haystack, $needle, $offset = 0) {
  $index = strpos($haystack, $needle, $offset);
  return $index !== false ? $index : -1;
}