StringNormalizationExtensions.TryNormalize Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Normalizes the specified span of characters to the specified normalization form.
public static bool TryNormalize(this ReadOnlySpan<char> source, Span<char> destination, out int charsWritten, System.Text.NormalizationForm normalizationForm = System.Text.NormalizationForm.FormC);
static member TryNormalize : ReadOnlySpan<char> * Span<char> * int * System.Text.NormalizationForm -> bool
<Extension()>
Public Function TryNormalize (source As ReadOnlySpan(Of Char), destination As Span(Of Char), ByRef charsWritten As Integer, Optional normalizationForm As NormalizationForm = System.Text.NormalizationForm.FormC) As Boolean
Parameters
- source
- ReadOnlySpan<Char>
The span of characters to normalize.
- charsWritten
- Int32
When this method returns, contains the number of characters written to destination.
- normalizationForm
- NormalizationForm
The normalization form to use.
Returns
true if the specified span of characters was successfully normalized; otherwise, false.
Exceptions
The specified character span contains an invalid code point or the normalization form is invalid.