function _advagg_string_size_in_bytes in Advanced CSS/JS Aggregation 7.2
Given a string, what is the size that it should be as a file?
Code from http://stackoverflow.com/a/3511239/231914.
Parameters
string $string: Input data to be sized in bytes.
Return value
int Number of bytes this string uses.
1 call to _advagg_string_size_in_bytes()
- advagg_save_data in ./
advagg.missing.inc - Save data to a file.
File
- ./
advagg.missing.inc, line 1428 - Advanced CSS/JS aggregation module.
Code
function _advagg_string_size_in_bytes($string) {
if (function_exists('mb_strlen')) {
return mb_strlen($string, '8bit');
}
else {
return strlen($string);
}
}