C# String IsNormalized()
Description
String IsNormalized()
indicates whether this string
is in Unicode normalization form C.
Syntax
String.IsNormalized()
has the following syntax.
public bool IsNormalized()
Returns
String.IsNormalized()
method returns true if this string is in normalization form C; otherwise, false.
Example
The following example determines whether a string is successfully normalized to various normalization forms.
/*from w w w . ja v a 2s . c o m*/
using System;
using System.Text;
class Sample
{
public static void Main()
{
string s1 = new String( new char[] {'\u0063', '\u0301', '\u0327', '\u00BE'});
string s2 = null;
Console.WriteLine(s1.IsNormalized());
s2 = s1.Normalize();
Console.WriteLine(s2.IsNormalized());
}
}
The code above generates the following result.