Language

UnicodeFilter.Matches(IReplaceable, Int32[], Int32, Boolean) Method

Definition

Default implementation of UnicodeMatcher::matches() for Unicode filters.

[Android.Runtime.Register("matches", "(Landroid/icu/text/Replaceable;[IIZ)I", "GetMatches_Landroid_icu_text_Replaceable_arrayIIZHandler", ApiSince=24)]
public virtual int Matches(Android.Icu.Text.IReplaceable? text, int[]? offset, int limit, bool incremental);
[<Android.Runtime.Register("matches", "(Landroid/icu/text/Replaceable;[IIZ)I", "GetMatches_Landroid_icu_text_Replaceable_arrayIIZHandler", ApiSince=24)>]
abstract member Matches : Android.Icu.Text.IReplaceable * int[] * int * bool -> int
override this.Matches : Android.Icu.Text.IReplaceable * int[] * int * bool -> int

Parameters

text
IReplaceable

the text to be matched

offset
Int32[]

on input, the index into text at which to begin matching. On output, the limit of the matched text. The number of matched characters is the output value of offset minus the input value. Offset should always point to the HIGH SURROGATE (leading code unit) of a pair of surrogates, both on entry and upon return.

limit
Int32

the limit index of text to be matched. Greater than offset for a forward direction match, less than offset for a backward direction match. The last character to be considered for matching will be text.charAt(limit-1) in the forward direction or text.charAt(limit+1) in the backward direction.

incremental
Boolean

if true, then assume further characters may be inserted at limit and check for partial matching. Otherwise assume the text as given is complete.

Returns

a match degree value indicating a full match, a partial match, or a mismatch. If incremental is false then U_PARTIAL_MATCH should never be returned.

Implements

Attributes

Remarks

Default implementation of UnicodeMatcher::matches() for Unicode filters. Matches a single 16-bit code unit at offset.

Java documentation for android.icu.text.UnicodeFilter.matches(android.icu.text.Replaceable, int[], int, boolean).

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