Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 18527 программистов и 1635 роботов. Сейчас ищут 1359 программистов ...
The Normalizer class
Вернуться к: intl
(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)
Введение
Normalization is a process that involves transforming characters and sequences of characters into a formally-defined underlying representation. This process is most important when text needs to be compared for sorting and searching, but it is also used when storing text to ensure that the text is stored in a consistent representation.
The Unicode Consortium has defined a number of normalization forms reflecting the various needs of applications:
- Normalization Form D (NFD) - Canonical Decomposition
- Normalization Form C (NFC) - Canonical Decomposition followed by Canonical Composition
- Normalization Form KD (NFKD) - Compatibility Decomposition
- Normalization Form KC (NFKC) - Compatibility Decomposition followed by Canonical Composition
Обзор классов
Normalizer
{
/* Методы */
}Предопределенные константы
The following constants define the normalization form used by the normalizer:
-
Normalizer::FORM_C
(integer) - Normalization Form C (NFC) - Canonical Decomposition followed by Canonical Composition
-
Normalizer::FORM_D
(integer) - Normalization Form D (NFD) - Canonical Decomposition
-
Normalizer::FORM_KC
(integer) - Normalization Form KC (NFKC) - Compatibility Decomposition, followed by Canonical Composition
-
Normalizer::FORM_KD
(integer) - Normalization Form KD (NFKD) - Compatibility Decomposition
-
Normalizer::NONE
(integer) - No decomposition/composition
-
Normalizer::OPTION_DEFAULT
(integer) - Default normalization options
Содержание
- Normalizer::isNormalized — Checks if the provided string is already in the specified normalization form.
- Normalizer::normalize — Normalizes the input provided and returns the normalized string
Вернуться к: intl