다음을 통해 공유


SearchIterator.Preceding(Int32) Method

Definition

Returns the first index less than position at which the string text matches the search pattern.

[Android.Runtime.Register("preceding", "(I)I", "", ApiSince=24)]
public int Preceding (int position);
[<Android.Runtime.Register("preceding", "(I)I", "", ApiSince=24)>]
member this.Preceding : int -> int

Parameters

position
Int32

where search is to start from.

Returns

The character index of the first match preceding position, or #DONE if there are no matches.

Attributes

Remarks

Returns the first index less than position at which the string text matches the search pattern. The iterator is adjusted so that its current index (as returned by #getIndex) is the match position if one was found. If a match is not found, #DONE will be returned and the iterator will be adjusted to the index #DONE

When the overlapping option (#isOverlapping) is off, the last index of the result match is always less than position. When the overlapping option is on, the result match may span across position.

Java documentation for android.icu.text.SearchIterator.preceding(int).

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