function AbstractUnicodeString::folded
Overrides AbstractString::folded
File
-
vendor/
symfony/ string/ AbstractUnicodeString.php, line 187
Class
- AbstractUnicodeString
- Represents a string of abstract Unicode characters.
Namespace
Symfony\Component\StringCode
public function folded(bool $compat = true) : static {
$str = clone $this;
if (!$compat || !\defined('Normalizer::NFKC_CF')) {
$str->string = normalizer_normalize($str->string, $compat ? \Normalizer::NFKC : \Normalizer::NFC);
$str->string = mb_strtolower(str_replace(self::FOLD_FROM, self::FOLD_TO, $str->string), 'UTF-8');
}
else {
$str->string = normalizer_normalize($str->string, \Normalizer::NFKC_CF);
}
return $str;
}