class Normalizer (View source)

Constants

NFKC_CF

FORM_KC_CF

OPTION_DEFAULT

Default normalization options

NONE

No decomposition/composition

FORM_D

Normalization Form D (NFD) - Canonical Decomposition

NFD

FORM_KD

Normalization Form KD (NFKD) - Compatibility Decomposition

NFKD

FORM_C

Normalization Form C (NFC) - Canonical Decomposition followed by Canonical Composition

NFC

FORM_KC

Normalization Form KC (NFKC) - Compatibility Decomposition, followed by Canonical Composition

NFKC

Methods

static string|false
normalize(string $string, int $form = Normalizer::FORM_C, $arg3)

(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Normalizes the input provided and returns the normalized string

static bool
isNormalized(string $string, int $form = Normalizer::FORM_C, $arg3)

(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Checks if the provided string is already in the specified normalization form.

static string|null
getRawDecomposition(string $string, int $form = 16)

No description

Details

static string|false normalize(string $string, int $form = Normalizer::FORM_C, $arg3)

(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Normalizes the input provided and returns the normalized string

Parameters

string $string

The input string to normalize

int $form

One of the normalization forms.

$arg3

Return Value

string|false

The normalized string or FALSE if an error occurred.

static bool isNormalized(string $string, int $form = Normalizer::FORM_C, $arg3)

(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)
Checks if the provided string is already in the specified normalization form.

Parameters

string $string

The input string to normalize

int $form

One of the normalization forms.

$arg3

Return Value

bool

TRUE if normalized, FALSE otherwise or if there an error

static string|null getRawDecomposition(string $string, int $form = 16)

Since: 7.3

No description

Parameters

string $string

The input string to normalize

int $form

Return Value

string|null

Returns a string containing the Decomposition_Mapping property, if present in the UCD. Returns null if there is no Decomposition_Mapping property for the character.