You are here

public static function Unicode::caseFlip in Drupal 8

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\Utility

Code

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);
}