RuleBasedCollator.Compare(String, String) Method

Definition

Compares the character data stored in two different strings based on the collation rules.

[Android.Runtime.Register("compare", "(Ljava/lang/String;Ljava/lang/String;)I", "GetCompare_Ljava_lang_String_Ljava_lang_String_Handler")]
public override int Compare (string? source, string? target);
[<Android.Runtime.Register("compare", "(Ljava/lang/String;Ljava/lang/String;)I", "GetCompare_Ljava_lang_String_Ljava_lang_String_Handler")>]
override this.Compare : string * string -> int

Parameters

source
String

the source text.

target
String

the target text.

Returns

Attributes

Remarks

Compares the character data stored in two different strings based on the collation rules. Returns information about whether a string is less than, greater than or equal to another string in a language. This can be overridden in a subclass.

Java documentation for java.text.RuleBasedCollator.compare(java.lang.String, 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