You are here

private function CSSmin::index_of in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 8.2 advagg_css_minify/yui/CSSMin.inc \CSSmin::index_of()
  2. 8.3 advagg_css_minify/yui/CSSMin.inc \CSSmin::index_of()

PHP port of Javascript's "indexOf" function for strings only Author: Tubal Martin http://blog.margenn.com

Parameters

string $haystack:

string $needle:

int $offset index (optional):

Return value

int

6 calls to CSSmin::index_of()
CSSmin::compress_hex_colors in advagg_css_compress/yui/CSSMin.inc
Utility method to compress hex color values of the form #AABBCC to #ABC or short color name.
CSSmin::extract_data_urls in advagg_css_compress/yui/CSSMin.inc
Utility method to replace all data urls with tokens before we start compressing, to avoid performance issues running some of the subsequent regexes against large strings chunks.
CSSmin::minify in advagg_css_compress/yui/CSSMin.inc
Does bulk of the minification
CSSmin::replace_string in advagg_css_compress/yui/CSSMin.inc
CSSmin::rgb_to_hex in advagg_css_compress/yui/CSSMin.inc

... See full list

File

advagg_css_compress/yui/CSSMin.inc, line 636

Class

CSSmin

Code

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