Lines Matching refs:text
659 * @param string $text
663 public function toUtf8(string $text): string argument
666 $text = preg_replace('/([\xE0-\xFF]+)(.)/', '$2$1', $text);
669 $text = strtr($text, self::TO_UTF8);
672 return strtr($text, self::PRECOMPOSED_CHARACTERS);
678 * @param string $text
682 public function fromUtf8(string $text): string argument
685 $text = strtr($text, array_flip(self::PRECOMPOSED_CHARACTERS));
688 $text = strtr($text, self::HORN_CONVERT_STEP_1);
691 $text = parent::fromUtf8($text);
694 $text = strtr($text, self::HORN_CONVERT_STEP_2);
697 $text = preg_replace('/([^\xE0-\xFF])([\xE0-\xFF]+)/', '$2$1', $text);
699 return $text;