StringNormalizationExtensions.Normalize Method

Definition

Normalizes a string.

Overloads

Normalize(String)

Normalizes a string to a Unicode normalization form C.

Normalize(String, NormalizationForm)

Normalizes a string to the specified Unicode normalization form.

Normalize(String)

Source:
StringNormalizationExtensions.cs
Source:
StringNormalizationExtensions.cs
Source:
StringNormalizationExtensions.cs

Normalizes a string to a Unicode normalization form C.

C#
public static string Normalize(this string value);
C#
public static string Normalize(this string strInput);

Parameters

valuestrInput
String

The string to normalize.

Returns

A new string whose textual value is the same as value but whose binary representation is in Unicode normalization form C.

Exceptions

value is null.

value contains invalid Unicode characters.

Applies to

.NET 10 ja muud versioonid
Toode Versioonid
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Normalize(String, NormalizationForm)

Source:
StringNormalizationExtensions.cs
Source:
StringNormalizationExtensions.cs
Source:
StringNormalizationExtensions.cs

Normalizes a string to the specified Unicode normalization form.

C#
[System.Security.SecurityCritical]
public static string Normalize(this string value, System.Text.NormalizationForm normalizationForm);
C#
public static string Normalize(this string strInput, System.Text.NormalizationForm normalizationForm);

Parameters

valuestrInput
String

The string to normalize.

normalizationForm
NormalizationForm

The Unicode normalization form.

Returns

A new string whose textual value is the same as value but whose binary representation is in the normalizationForm normalization form.

Attributes

Exceptions

value is null.

value contains invalid Unicode characters.

Applies to

.NET 10 ja muud versioonid
Toode Versioonid
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0