Same name in other branches
- 6.0.x src/Asset/SingleAssetOptimizerBase.php \Drupal\advagg\Asset\SingleAssetOptimizerBase::stringContainsMultibyteCharacters()
- 8.x-3.x src/Asset/SingleAssetOptimizerBase.php \Drupal\advagg\Asset\SingleAssetOptimizerBase::stringContainsMultibyteCharacters()
- 8.x-4.x src/Asset/SingleAssetOptimizerBase.php \Drupal\advagg\Asset\SingleAssetOptimizerBase::stringContainsMultibyteCharacters()
Checks if string contains multibyte characters.
Parameters
string $string: String to check.
Return value
bool TRUE if string contains multibyte character.
1 call to SingleAssetOptimizerBase::stringContainsMultibyteCharacters()
- JsMinifier::minifyJsmin in advagg_js_minify/
src/ Asset/ JsMinifier.php - Minify a JS string using jsmin.
File
-
src/
Asset/ SingleAssetOptimizerBase.php, line 75
Class
- SingleAssetOptimizerBase
- A base class for optimizing (especially minifying) assets.
Namespace
Drupal\advagg\AssetCode
protected function stringContainsMultibyteCharacters($string) {
// Check if there are multi-byte characters: If the UTF-8 encoded string has
// multibyte chars strlen() will return a byte-count greater than the actual
// character count, returned by drupal_strlen().
if (strlen($string) === mb_strlen($string)) {
return FALSE;
}
return TRUE;
}