Checks if string contains multibyte characters.
Paramètres
string $string: String to check.
Return value
bool TRUE if string contains multibyte character.
1 call to JsOptimizer::stringContainsMultibyteCharacters()
- JsOptimizer::minifyJsmin dans advagg_js_minify/
src/ Asset/ JsOptimizer.php - Minify a JS string using jsmin.
Fichier
-
advagg_js_minify/
src/ Asset/ JsOptimizer.php, line 478
Classe
- 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;
}