String.CompareToIgnoreCase(String) Method

Definition

Compares two strings lexicographically, ignoring case differences.

[Android.Runtime.Register("compareToIgnoreCase", "(Ljava/lang/String;)I", "")]
public int CompareToIgnoreCase (string str);
[<Android.Runtime.Register("compareToIgnoreCase", "(Ljava/lang/String;)I", "")>]
member this.CompareToIgnoreCase : string -> int

Parameters

str
String

the String to be compared.

Returns

Int32

a negative integer, zero, or a positive integer as the specified String is greater than, equal to, or less than this String, ignoring case considerations.

Attributes

Exceptions

if string is null.

Remarks

Java documentation for java.lang.String.compareToIgnoreCase(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to