RuleBasedCollator.Compare(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Returns an integer value. Value is less than zero if source is less than target, value is zero if source and target are equal, value is greater than zero if source is greater than target.
- 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).
Java reference for java.text.RuleBasedCollator.compare.
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.