Checks if string contains multibyte characters.
Parameters
string $string: String to check.
Return value
bool TRUE if string contains multibyte character.
1 call to JsOptimizer::stringContainsMultibyteCharacters()
- JsOptimizer::minifyJsmin in advagg_js_minify/
src/ Asset/ JsOptimizer.php - Minify a JS string using jsmin.
File
-
advagg_js_minify/
src/ Asset/ JsOptimizer.php, line 478
Class
- JsOptimizer
- Optimizes a JavaScript asset.
Namespace
Drupal\advagg_js_minify\AssetCode
public function stringContainsMultibyteCharacters($string) {
// Check if there are multi-byte characters: If the UTF-8 encoded string has
// multibytes strlen() will return a byte-count greater than the actual
// character count, returned by drupal_strlen().
if (strlen($string) == drupal_strlen($string)) {
return FALSE;
}
return TRUE;
}