PeterO.Text.Normalizer

## PeterO.Text.Normalizer

public sealed class Normalizer

Deprecated. Use NormalizerInput instead; that class is much more flexible than Normalizer.

Implements the Unicode normalization algorithm and contains methods and functionality to test and convert Unicode strings for Unicode normalization.

NOTICE: While this class’s source code is in the public domain, the class uses an internal class, called NormalizationData, that includes data derived from the Unicode Character Database. See the documentation for the NormalizerInput class for the permission notice for the Unicode Character Database.

Member Summary

### Normalizer Constructor

public Normalizer(
    string str,
    PeterO.Text.Normalization form);

Initializes a new instance of the PeterO.Text.Normalizer class.

Parameters:

### IsNormalized

public static bool IsNormalized(
    string str,
    PeterO.Text.Normalization form);

Returns whether this string is normalized.

Parameters:

Return Value:

true if this string is normalized; otherwise, false . Returns false if the string contains an unpaired surrogate code point.

### Normalize

public static string Normalize(
    string str,
    PeterO.Text.Normalization form);

Converts a string to the given Unicode normalization form.

Parameters:

Return Value:

The parameter str converted to the given normalization form.

Exceptions:

### Read

public int Read(
    int[] chars,
    int index,
    int length);

Reads a sequence of Unicode code points from a data source.

Parameters:

Return Value:

The number of Unicode code points read, or 0 if the end of the source is reached.

Exceptions:

### ReadChar

public int ReadChar();

Reads a Unicode character from a data source.

Return Value:

Either a Unicode code point (from 0-0xd7ff or from 0xe000 to 0x10ffff), or the value -1 indicating the end of the source.

Back to MailLib start page.