function Unicode::caseFlip
Flip U+C0-U+DE to U+E0-U+FD and back. Can be used as preg_replace callback.
Parameters
array $matches: An array of matches by preg_replace_callback().
Return value
string The flipped text.
Deprecated
in drupal:8.8.0 and is removed from drupal:9.0.0. There is no direct replacement.
See also
https://www.drupal.org/node/3057322
File
-
core/
lib/ Drupal/ Component/ Utility/ Unicode.php, line 566
Class
- Unicode
- Provides Unicode-related conversions and operations.
Namespace
Drupal\Component\UtilityCode
public static function caseFlip($matches) {
@trigger_error('\\Drupal\\Component\\Utility\\Unicode::caseFlip() is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. There is no direct replacement. See https://www.drupal.org/node/3057322', E_USER_DEPRECATED);
return $matches[0][0] . chr(ord($matches[0][1]) ^ 32);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.