StringNormalizationExtensions.Normalize 方法

定義

正規化字串。Normalizes a string.

多載

Normalize(String)

將字串標準化為 Unicode 正規化格式 C。Normalizes a string to a Unicode normalization form C.

Normalize(String, NormalizationForm)

將字串標準化為指定的 Unicode 正規化格式。Normalizes a string to the specified Unicode normalization form.

Normalize(String)

將字串標準化為 Unicode 正規化格式 C。Normalizes a string to a Unicode normalization form C.

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ Normalize(System::String ^ value);
public static string Normalize (this string value);
static member Normalize : string -> string
<Extension()>
Public Function Normalize (value As String) As String

參數

value
String

要正規化的字串。The string to normalize.

傳回

新字串,其文字值與 value 相同,但二進位表示卻是 Unicode 正規化格式 C。A new string whose textual value is the same as value but whose binary representation is in Unicode normalization form C.

例外狀況

valuenullvalue is null.

value 包含無效的 Unicode 字元。value contains invalid Unicode characters.

Normalize(String, NormalizationForm)

將字串標準化為指定的 Unicode 正規化格式。Normalizes a string to the specified Unicode normalization form.

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ Normalize(System::String ^ value, System::Text::NormalizationForm normalizationForm);
[System.Security.SecurityCritical]
public static string Normalize (this string value, System.Text.NormalizationForm normalizationForm);
static member Normalize : string * System.Text.NormalizationForm -> string

參數

value
String

要正規化的字串。The string to normalize.

normalizationForm
NormalizationForm

Unicode 正規化格式。The Unicode normalization form.

傳回

新字串,其文字值與 value 相同,但二進位表示卻是 normalizationForm 正規化格式。A new string whose textual value is the same as value but whose binary representation is in the normalizationForm normalization form.

屬性

例外狀況

valuenullvalue is null.

value 包含無效的 Unicode 字元。value contains invalid Unicode characters.

適用於