Instance Method インスタンスメソッド

localizedCaseInsensitiveCompare(_:)

Compares the string with a given string using a case-insensitive, localized, comparison. この文字列をある与えられた文字列と比較します、ケースを考慮しない、ローカライズされた比較を使います。

Declaration 宣言

func localizedCaseInsensitiveCompare(_ string: String) -> ComparisonResult

Parameters パラメータ

aString

The string with which to compare the receiver. レシーバと比較する文字列。

This value must not be nil. If this value is nil, the behavior is undefined and may change in future versions of macOS. この値は、nilではいけません。この値がnilならば、その挙動は未定義です、そして将来のバージョンのmacOSでは変わるかもしれません。

Return Value 戻り値

Returns an ComparisonResult value that indicates the lexical ordering. ComparisonResult.orderedAscending the receiver precedes aString in lexical ordering, ComparisonResult.orderedSame the receiver and aString are equivalent in lexical value, and ComparisonResult.orderedDescending if the receiver follows aString. ComparisonResult値を返します、それは語彙的順序を指し示します。ComparisonResult.orderedAscendingはレシーバが語彙的順序においてaStringを越える、ComparisonResult.orderedSameはレシーバとaStringが文字列順序において同等、そしてComparisonResult.orderedDescendingはレシーバがaStringの後に続く場合。

Discussion 議論

This method uses the current locale. このメソッドは、現在のロケールを使います。

See Also 参照

Identifying and Comparing Strings 文字列を識別および比較する