String.Normalize メソッド

定義

バイナリ表現が特定の Unicode 正規形である新しい文字列を返します。

オーバーロード

Normalize(NormalizationForm)

この文字列と同じテキスト値を持ち、なおかつ、バイナリ表現が、指定された Unicode 正規形である新しい文字列を返します。

Normalize()

この文字列と同じテキスト値を持ち、なおかつ、バイナリ表現が Unicode 正規形 C である新しい文字列を返します。

次の例では、文字列を 4 つの正規化形式のそれぞれに正規化し、文字列が指定された正規化形式に正規化されたことを確認してから、正規化された文字列内のコード ポイントを一覧表示します。

using namespace System;
using namespace System::Text;

void Show( String^ title, String^ s )
{
   Console::Write( "Characters in string {0} = ", title );
   for each (short x in s) {
      Console::Write("{0:X4} ", x);
   }
   Console::WriteLine();
}

int main()
{
   
   // Character c; combining characters acute and cedilla; character 3/4
   array<Char>^temp0 = {L'c',L'\u0301',L'\u0327',L'\u00BE'};
   String^ s1 = gcnew String( temp0 );
   String^ s2 = nullptr;
   String^ divider = gcnew String( '-',80 );
   divider = String::Concat( Environment::NewLine, divider, Environment::NewLine );

   Show( "s1", s1 );
   Console::WriteLine();
   Console::WriteLine( "U+0063 = LATIN SMALL LETTER C" );
   Console::WriteLine( "U+0301 = COMBINING ACUTE ACCENT" );
   Console::WriteLine( "U+0327 = COMBINING CEDILLA" );
   Console::WriteLine( "U+00BE = VULGAR FRACTION THREE QUARTERS" );
   Console::WriteLine( divider );
   Console::WriteLine( "A1) Is s1 normalized to the default form (Form C)?: {0}", s1->IsNormalized() );
   Console::WriteLine( "A2) Is s1 normalized to Form C?:  {0}", s1->IsNormalized( NormalizationForm::FormC ) );
   Console::WriteLine( "A3) Is s1 normalized to Form D?:  {0}", s1->IsNormalized( NormalizationForm::FormD ) );
   Console::WriteLine( "A4) Is s1 normalized to Form KC?: {0}", s1->IsNormalized( NormalizationForm::FormKC ) );
   Console::WriteLine( "A5) Is s1 normalized to Form KD?: {0}", s1->IsNormalized( NormalizationForm::FormKD ) );
   Console::WriteLine( divider );
   Console::WriteLine( "Set string s2 to each normalized form of string s1." );
   Console::WriteLine();
   Console::WriteLine( "U+1E09 = LATIN SMALL LETTER C WITH CEDILLA AND ACUTE" );
   Console::WriteLine( "U+0033 = DIGIT THREE" );
   Console::WriteLine( "U+2044 = FRACTION SLASH" );
   Console::WriteLine( "U+0034 = DIGIT FOUR" );
   Console::WriteLine( divider );
   s2 = s1->Normalize();
   Console::Write( "B1) Is s2 normalized to the default form (Form C)?: " );
   Console::WriteLine( s2->IsNormalized() );
   Show( "s2", s2 );
   Console::WriteLine();
   s2 = s1->Normalize( NormalizationForm::FormC );
   Console::Write( "B2) Is s2 normalized to Form C?: " );
   Console::WriteLine( s2->IsNormalized( NormalizationForm::FormC ) );
   Show( "s2", s2 );
   Console::WriteLine();
   s2 = s1->Normalize( NormalizationForm::FormD );
   Console::Write( "B3) Is s2 normalized to Form D?: " );
   Console::WriteLine( s2->IsNormalized( NormalizationForm::FormD ) );
   Show( "s2", s2 );
   Console::WriteLine();
   s2 = s1->Normalize( NormalizationForm::FormKC );
   Console::Write( "B4) Is s2 normalized to Form KC?: " );
   Console::WriteLine( s2->IsNormalized( NormalizationForm::FormKC ) );
   Show( "s2", s2 );
   Console::WriteLine();
   s2 = s1->Normalize( NormalizationForm::FormKD );
   Console::Write( "B5) Is s2 normalized to Form KD?: " );
   Console::WriteLine( s2->IsNormalized( NormalizationForm::FormKD ) );
   Show( "s2", s2 );
   Console::WriteLine();
}

/*
This example produces the following results:

Characters in string s1 = 0063 0301 0327 00BE

U+0063 = LATIN SMALL LETTER C
U+0301 = COMBINING ACUTE ACCENT
U+0327 = COMBINING CEDILLA
U+00BE = VULGAR FRACTION THREE QUARTERS

--------------------------------------------------------------------------------

A1) Is s1 normalized to the default form (Form C)?: False
A2) Is s1 normalized to Form C?:  False
A3) Is s1 normalized to Form D?:  False
A4) Is s1 normalized to Form KC?: False
A5) Is s1 normalized to Form KD?: False

--------------------------------------------------------------------------------

Set string s2 to each normalized form of string s1.

U+1E09 = LATIN SMALL LETTER C WITH CEDILLA AND ACUTE
U+0033 = DIGIT THREE
U+2044 = FRACTION SLASH
U+0034 = DIGIT FOUR

--------------------------------------------------------------------------------

B1) Is s2 normalized to the default form (Form C)?: True
Characters in string s2 = 1E09 00BE

B2) Is s2 normalized to Form C?: True
Characters in string s2 = 1E09 00BE

B3) Is s2 normalized to Form D?: True
Characters in string s2 = 0063 0327 0301 00BE

B4) Is s2 normalized to Form KC?: True
Characters in string s2 = 1E09 0033 2044 0034

B5) Is s2 normalized to Form KD?: True
Characters in string s2 = 0063 0327 0301 0033 2044 0034

*/
using System;
using System.Text;

class Example
{
    public static void Main()
    {
       // Character c; combining characters acute and cedilla; character 3/4
       string s1 = new String( new char[] {'\u0063', '\u0301', '\u0327', '\u00BE'});
       string s2 = null;
       string divider = new String('-', 80);
       divider = String.Concat(Environment.NewLine, divider, Environment.NewLine);

       Show("s1", s1);
       Console.WriteLine();
       Console.WriteLine("U+0063 = LATIN SMALL LETTER C");
       Console.WriteLine("U+0301 = COMBINING ACUTE ACCENT");
       Console.WriteLine("U+0327 = COMBINING CEDILLA");
       Console.WriteLine("U+00BE = VULGAR FRACTION THREE QUARTERS");
       Console.WriteLine(divider);

       Console.WriteLine("A1) Is s1 normalized to the default form (Form C)?: {0}",
                                    s1.IsNormalized());
       Console.WriteLine("A2) Is s1 normalized to Form C?:  {0}",
                                    s1.IsNormalized(NormalizationForm.FormC));
       Console.WriteLine("A3) Is s1 normalized to Form D?:  {0}",
                                    s1.IsNormalized(NormalizationForm.FormD));
       Console.WriteLine("A4) Is s1 normalized to Form KC?: {0}",
                                    s1.IsNormalized(NormalizationForm.FormKC));
       Console.WriteLine("A5) Is s1 normalized to Form KD?: {0}",
                                    s1.IsNormalized(NormalizationForm.FormKD));

       Console.WriteLine(divider);

       Console.WriteLine("Set string s2 to each normalized form of string s1.");
       Console.WriteLine();
       Console.WriteLine("U+1E09 = LATIN SMALL LETTER C WITH CEDILLA AND ACUTE");
       Console.WriteLine("U+0033 = DIGIT THREE");
       Console.WriteLine("U+2044 = FRACTION SLASH");
       Console.WriteLine("U+0034 = DIGIT FOUR");
       Console.WriteLine(divider);

       s2 = s1.Normalize();
       Console.Write("B1) Is s2 normalized to the default form (Form C)?: ");
       Console.WriteLine(s2.IsNormalized());
       Show("s2", s2);
       Console.WriteLine();

       s2 = s1.Normalize(NormalizationForm.FormC);
       Console.Write("B2) Is s2 normalized to Form C?: ");
       Console.WriteLine(s2.IsNormalized(NormalizationForm.FormC));
       Show("s2", s2);
       Console.WriteLine();

       s2 = s1.Normalize(NormalizationForm.FormD);
       Console.Write("B3) Is s2 normalized to Form D?: ");
       Console.WriteLine(s2.IsNormalized(NormalizationForm.FormD));
       Show("s2", s2);
       Console.WriteLine();

       s2 = s1.Normalize(NormalizationForm.FormKC);
       Console.Write("B4) Is s2 normalized to Form KC?: ");
       Console.WriteLine(s2.IsNormalized(NormalizationForm.FormKC));
       Show("s2", s2);
       Console.WriteLine();

       s2 = s1.Normalize(NormalizationForm.FormKD);
       Console.Write("B5) Is s2 normalized to Form KD?: ");
       Console.WriteLine(s2.IsNormalized(NormalizationForm.FormKD));
       Show("s2", s2);
       Console.WriteLine();
    }

    private static void Show(string title, string s)
    {
       Console.Write("Characters in string {0} = ", title);
       foreach(short x in s) {
           Console.Write("{0:X4} ", x);
       }
       Console.WriteLine();
    }
}
/*
This example produces the following results:

Characters in string s1 = 0063 0301 0327 00BE

U+0063 = LATIN SMALL LETTER C
U+0301 = COMBINING ACUTE ACCENT
U+0327 = COMBINING CEDILLA
U+00BE = VULGAR FRACTION THREE QUARTERS

--------------------------------------------------------------------------------

A1) Is s1 normalized to the default form (Form C)?: False
A2) Is s1 normalized to Form C?:  False
A3) Is s1 normalized to Form D?:  False
A4) Is s1 normalized to Form KC?: False
A5) Is s1 normalized to Form KD?: False

--------------------------------------------------------------------------------

Set string s2 to each normalized form of string s1.

U+1E09 = LATIN SMALL LETTER C WITH CEDILLA AND ACUTE
U+0033 = DIGIT THREE
U+2044 = FRACTION SLASH
U+0034 = DIGIT FOUR

--------------------------------------------------------------------------------

B1) Is s2 normalized to the default form (Form C)?: True
Characters in string s2 = 1E09 00BE

B2) Is s2 normalized to Form C?: True
Characters in string s2 = 1E09 00BE

B3) Is s2 normalized to Form D?: True
Characters in string s2 = 0063 0327 0301 00BE

B4) Is s2 normalized to Form KC?: True
Characters in string s2 = 1E09 0033 2044 0034

B5) Is s2 normalized to Form KD?: True
Characters in string s2 = 0063 0327 0301 0033 2044 0034

*/
open System
open System.Text

let show title (s: string) =
    printf $"Characters in string %s{title} = "
    for x in s do
        printf $"{int16 x:X4} "
    printfn ""


[<EntryPoint>]
let main _ =
    // Character c; combining characters acute and cedilla; character 3/4
    let s1 = String [| '\u0063'; '\u0301'; '\u0327'; '\u00BE' |]
    let divider = String('-', 80)
    let divider = String.Concat(Environment.NewLine, divider, Environment.NewLine)

    show "s1" s1
    printfn "\nU+0063 = LATIN SMALL LETTER C"
    printfn "U+0301 = COMBINING ACUTE ACCENT"
    printfn "U+0327 = COMBINING CEDILLA"
    printfn "U+00BE = VULGAR FRACTION THREE QUARTERS"
    printfn $"{divider}"

    printfn $"A1) Is s1 normalized to the default form (Form C)?: {s1.IsNormalized()}"
    printfn $"A2) Is s1 normalized to Form C?:  {s1.IsNormalized NormalizationForm.FormC}"
    printfn $"A3) Is s1 normalized to Form D?:  {s1.IsNormalized NormalizationForm.FormD}"
    printfn $"A4) Is s1 normalized to Form KC?: {s1.IsNormalized NormalizationForm.FormKC}"
    printfn $"A5) Is s1 normalized to Form KD?: {s1.IsNormalized NormalizationForm.FormKD}"

    printfn $"{divider}"

    printfn "Set string s2 to each normalized form of string s1.\n"
    printfn "U+1E09 = LATIN SMALL LETTER C WITH CEDILLA AND ACUTE"
    printfn"U+0033 = DIGIT THREE"
    printfn"U+2044 = FRACTION SLASH"
    printfn"U+0034 = DIGIT FOUR"
    printfn $"{divider}"
 
    let s2 = s1.Normalize()
    printf "B1) Is s2 normalized to the default form (Form C)?: "
    printfn $"{s2.IsNormalized()}"
    show "s2" s2
    printfn ""

    let s2 = s1.Normalize NormalizationForm.FormC
    printf "B2) Is s2 normalized to Form C?: "
    printfn $"{s2.IsNormalized NormalizationForm.FormC}"
    show "s2" s2
    printfn ""

    let s2 = s1.Normalize NormalizationForm.FormD
    printf "B3) Is s2 normalized to Form D?: "
    printfn $"{s2.IsNormalized NormalizationForm.FormD}"
    show "s2" s2
    printfn ""

    let s2 = s1.Normalize(NormalizationForm.FormKC)
    printf "B4) Is s2 normalized to Form KC?: "
    printfn $"{s2.IsNormalized NormalizationForm.FormKC}"
    show "s2" s2
    printfn ""

    let s2 = s1.Normalize(NormalizationForm.FormKD)
    printf "B5) Is s2 normalized to Form KD?: "
    printfn $"{s2.IsNormalized NormalizationForm.FormKD}"
    show "s2" s2
    0

(*
This example produces the following results:

Characters in string s1 = 0063 0301 0327 00BE

U+0063 = LATIN SMALL LETTER C
U+0301 = COMBINING ACUTE ACCENT
U+0327 = COMBINING CEDILLA
U+00BE = VULGAR FRACTION THREE QUARTERS

--------------------------------------------------------------------------------

A1) Is s1 normalized to the default form (Form C)?: False
A2) Is s1 normalized to Form C?:  False
A3) Is s1 normalized to Form D?:  False
A4) Is s1 normalized to Form KC?: False
A5) Is s1 normalized to Form KD?: False

--------------------------------------------------------------------------------

Set string s2 to each normalized form of string s1.

U+1E09 = LATIN SMALL LETTER C WITH CEDILLA AND ACUTE
U+0033 = DIGIT THREE
U+2044 = FRACTION SLASH
U+0034 = DIGIT FOUR

--------------------------------------------------------------------------------

B1) Is s2 normalized to the default form (Form C)?: True
Characters in string s2 = 1E09 00BE

B2) Is s2 normalized to Form C?: True
Characters in string s2 = 1E09 00BE

B3) Is s2 normalized to Form D?: True
Characters in string s2 = 0063 0327 0301 00BE

B4) Is s2 normalized to Form KC?: True
Characters in string s2 = 1E09 0033 2044 0034

B5) Is s2 normalized to Form KD?: True
Characters in string s2 = 0063 0327 0301 0033 2044 0034

*)
Imports System.Text

Class Example
   Public Shared Sub Main()
      ' Character c; combining characters acute and cedilla; character 3/4
      Dim s1 = New [String](New Char() {ChrW(&H0063), ChrW(&H0301), ChrW(&H0327), ChrW(&H00BE)})
      Dim s2 As String = Nothing
      Dim divider = New [String]("-"c, 80)
      divider = [String].Concat(Environment.NewLine, divider, Environment.NewLine)
      
      Show("s1", s1)
      Console.WriteLine()
      Console.WriteLine("U+0063 = LATIN SMALL LETTER C")
      Console.WriteLine("U+0301 = COMBINING ACUTE ACCENT")
      Console.WriteLine("U+0327 = COMBINING CEDILLA")
      Console.WriteLine("U+00BE = VULGAR FRACTION THREE QUARTERS")

      Console.WriteLine(divider)
      
      Console.WriteLine("A1) Is s1 normalized to the default form (Form C)?: {0}", s1.IsNormalized())
      Console.WriteLine("A2) Is s1 normalized to Form C?:  {0}", s1.IsNormalized(NormalizationForm.FormC))
      Console.WriteLine("A3) Is s1 normalized to Form D?:  {0}", s1.IsNormalized(NormalizationForm.FormD))
      Console.WriteLine("A4) Is s1 normalized to Form KC?: {0}", s1.IsNormalized(NormalizationForm.FormKC))
      Console.WriteLine("A5) Is s1 normalized to Form KD?: {0}", s1.IsNormalized(NormalizationForm.FormKD))
      
      Console.WriteLine(divider)
      
      Console.WriteLine("Set string s2 to each normalized form of string s1.")
      Console.WriteLine()
      Console.WriteLine("U+1E09 = LATIN SMALL LETTER C WITH CEDILLA AND ACUTE")
      Console.WriteLine("U+0033 = DIGIT THREE")
      Console.WriteLine("U+2044 = FRACTION SLASH")
      Console.WriteLine("U+0034 = DIGIT FOUR")
      Console.WriteLine(divider)
      
      s2 = s1.Normalize()
      Console.Write("B1) Is s2 normalized to the default form (Form C)?: ")
      Console.WriteLine(s2.IsNormalized())
      Show("s2", s2)
      Console.WriteLine()
      
      s2 = s1.Normalize(NormalizationForm.FormC)
      Console.Write("B2) Is s2 normalized to Form C?: ")
      Console.WriteLine(s2.IsNormalized(NormalizationForm.FormC))
      Show("s2", s2)
      Console.WriteLine()
      
      s2 = s1.Normalize(NormalizationForm.FormD)
      Console.Write("B3) Is s2 normalized to Form D?: ")
      Console.WriteLine(s2.IsNormalized(NormalizationForm.FormD))
      Show("s2", s2)
      Console.WriteLine()
      
      s2 = s1.Normalize(NormalizationForm.FormKC)
      Console.Write("B4) Is s2 normalized to Form KC?: ")
      Console.WriteLine(s2.IsNormalized(NormalizationForm.FormKC))
      Show("s2", s2)
      Console.WriteLine()
      
      s2 = s1.Normalize(NormalizationForm.FormKD)
      Console.Write("B5) Is s2 normalized to Form KD?: ")
      Console.WriteLine(s2.IsNormalized(NormalizationForm.FormKD))
      Show("s2", s2)
      Console.WriteLine()
   End Sub 
   
   Private Shared Sub Show(title As String, s As String)
      Console.Write("Characters in string {0} = ", title)
      For Each x As Char In s
         Console.Write("{0:X4} ", AscW(x))
      Next 
      Console.WriteLine()
   End Sub 
End Class 
'This example produces the following results:
'
'Characters in string s1 = 0063 0301 0327 00BE
'
'U+0063 = LATIN SMALL LETTER C
'U+0301 = COMBINING ACUTE ACCENT
'U+0327 = COMBINING CEDILLA
'U+00BE = VULGAR FRACTION THREE QUARTERS
'
'--------------------------------------------------------------------------------
'
'A1) Is s1 normalized to the default form (Form C)?: False
'A2) Is s1 normalized to Form C?:  False
'A3) Is s1 normalized to Form D?:  False
'A4) Is s1 normalized to Form KC?: False
'A5) Is s1 normalized to Form KD?: False
'
'--------------------------------------------------------------------------------
'
'Set string s2 to each normalized form of string s1.
'
'U+1E09 = LATIN SMALL LETTER C WITH CEDILLA AND ACUTE
'U+0033 = DIGIT THREE
'U+2044 = FRACTION SLASH
'U+0034 = DIGIT FOUR
'
'--------------------------------------------------------------------------------
'
'B1) Is s2 normalized to the default form (Form C)?: True
'Characters in string s2 = 1E09 00BE
'
'B2) Is s2 normalized to Form C?: True
'Characters in string s2 = 1E09 00BE
'
'B3) Is s2 normalized to Form D?: True
'Characters in string s2 = 0063 0327 0301 00BE
'
'B4) Is s2 normalized to Form KC?: True
'Characters in string s2 = 1E09 0033 2044 0034
'
'B5) Is s2 normalized to Form KD?: True
'Characters in string s2 = 0063 0327 0301 0033 2044 0034
'

Normalize(NormalizationForm)

Source:
String.cs
Source:
String.cs
Source:
String.cs

この文字列と同じテキスト値を持ち、なおかつ、バイナリ表現が、指定された Unicode 正規形である新しい文字列を返します。

public:
 System::String ^ Normalize(System::Text::NormalizationForm normalizationForm);
public string Normalize (System.Text.NormalizationForm normalizationForm);
member this.Normalize : System.Text.NormalizationForm -> string
Public Function Normalize (normalizationForm As NormalizationForm) As String

パラメーター

normalizationForm
NormalizationForm

Unicode 正規形。

戻り値

この文字列と同じテキスト値を持ち、なおかつ、バイナリ表現が、normalizationForm パラメーターで指定された正規形である新しい文字列。

例外

現在のインスタンスに、正しくない Unicode 文字が含まれています。

注釈

一部の Unicode 文字には、組み合わせや複合 Unicode 文字のセットで構成される複数の同等のバイナリ表現があります。 1 つの文字に対して複数の表現が存在すると、検索、並べ替え、照合、およびその他の操作が複雑になります。

Unicode 標準では、文字の同等のバイナリ表現のいずれかを指定した場合に 1 つのバイナリ表現を返す正規化と呼ばれるプロセスを定義します。 正規化は、さまざまなルールに従う正規化フォームと呼ばれるいくつかのアルゴリズムを使用して実行できます。 .NET では、Unicode 標準で定義されている 4 つの正規化形式 (C、D、KC、KD) がサポートされています。 2 つの文字列が同じ正規化形式で表される場合は、序数比較を使用して比較できます。

2 つの文字列を正規化して比較するには、次の操作を行います。

  1. ファイルやユーザー入力デバイスなどの入力ソースから比較する文字列を取得します。

  2. メソッドを Normalize(NormalizationForm) 呼び出して、指定した正規化形式に文字列を正規化します。

  3. 2 つの文字列を比較するには、 メソッドなどの序数文字列比較をサポートするメソッドをCompare(String, String, StringComparison)呼び出し、 または StringComparison.OrdinalIgnoreCaseStringComparison.Ordinal値をStringComparison引数として指定します。 正規化された文字列の配列を並べ替えるには、 または StringComparer.OrdinalIgnoreCaseStringComparer.Ordinal値を comparer の適切なオーバーロードArray.Sortに渡します。

  4. 前の手順で示した順序に基づいて、並べ替えられた出力で文字列を出力します。

サポートされている Unicode 正規化フォームの説明については、「」を参照してください System.Text.NormalizationForm

注意 (呼び出し元)

メソッドは IsNormalized 、文字列内で false 正規化されていない最初の文字が検出されるとすぐに を返します。 したがって、文字列に正規化されていない文字の後に無効な Unicode 文字が続く場合、 Normalize メソッドは を ArgumentException スローしますが、 は IsNormalized を返します false

こちらもご覧ください

適用対象

Normalize()

Source:
String.cs
Source:
String.cs
Source:
String.cs

この文字列と同じテキスト値を持ち、なおかつ、バイナリ表現が Unicode 正規形 C である新しい文字列を返します。

public:
 System::String ^ Normalize();
public string Normalize ();
member this.Normalize : unit -> string
Public Function Normalize () As String

戻り値

この文字列と同じテキスト値を持ち、なおかつ、バイナリ表現が正規形 C である新しい文字列。

例外

現在のインスタンスに、正しくない Unicode 文字が含まれています。

注釈

一部の Unicode 文字には、組み合わせや複合 Unicode 文字のセットで構成される複数の同等のバイナリ表現があります。 たとえば、次のいずれかのコード ポイントは、文字 "ắ" を表すことができます。

  • U+1EAF

  • U+0103 U+0301

  • U+0061 U+0306 U+0301

1 つの文字に対して複数の表現が存在すると、検索、並べ替え、照合、およびその他の操作が複雑になります。

Unicode 標準では、文字の同等のバイナリ表現のいずれかを指定した場合に 1 つのバイナリ表現を返す正規化と呼ばれるプロセスを定義します。 正規化は、さまざまなルールに従う正規化フォームと呼ばれるいくつかのアルゴリズムを使用して実行できます。 .NET では、Unicode 標準で定義されている 4 つの正規化形式 (C、D、KC、KD) がサポートされています。 2 つの文字列が同じ正規化形式で表される場合は、序数比較を使用して比較できます。

2 つの文字列を正規化して比較するには、次の操作を行います。

  1. ファイルやユーザー入力デバイスなどの入力ソースから比較する文字列を取得します。

  2. メソッドを Normalize() 呼び出して、文字列を正規化形式 C に正規化します。

  3. 2 つの文字列を比較するには、 メソッドなどの序数文字列比較をサポートするメソッドをCompare(String, String, StringComparison)呼び出し、 または StringComparison.OrdinalIgnoreCaseStringComparison.Ordinal値をStringComparison引数として指定します。 正規化された文字列の配列を並べ替えるには、 または StringComparer.OrdinalIgnoreCaseStringComparer.Ordinal値を comparer の適切なオーバーロードArray.Sortに渡します。

  4. 前の手順で示した順序に基づいて、並べ替えられた出力で文字列を出力します。

サポートされている Unicode 正規化フォームの説明については、「」を参照してください System.Text.NormalizationForm

注意 (呼び出し元)

メソッドは IsNormalized 、文字列内で false 正規化されていない最初の文字が検出されるとすぐに を返します。 したがって、文字列に正規化されていない文字の後に無効な Unicode 文字が含まれている場合、 Normalize メソッドは を ArgumentException スローしますが IsNormalized 、 は を返します false

こちらもご覧ください

適用対象