Edit

Share via


StringNormalizationExtensions.GetNormalizedLength Method

Definition

Gets the estimated length of the normalized form of the specified string in the FormC.

public static int GetNormalizedLength(this ReadOnlySpan<char> source, System.Text.NormalizationForm normalizationForm = System.Text.NormalizationForm.FormC);
static member GetNormalizedLength : ReadOnlySpan<char> * System.Text.NormalizationForm -> int
<Extension()>
Public Function GetNormalizedLength (source As ReadOnlySpan(Of Char), Optional normalizationForm As NormalizationForm = System.Text.NormalizationForm.FormC) As Integer

Parameters

source
ReadOnlySpan<Char>

The character span to get the estimated length of the normalized form.

normalizationForm
NormalizationForm

The normalization form to use.

Returns

The estimated length of the normalized form of the specified string.

Exceptions

The specified character span contains an invalid code point or the normalization form is invalid.

Applies to