Freigeben über


CollationElementIterator.Previous Method

Definition

Get the previous collation element in the source string.

[Android.Runtime.Register("previous", "()I", "", ApiSince=24)]
public int Previous ();
[<Android.Runtime.Register("previous", "()I", "", ApiSince=24)>]
member this.Previous : unit -> int

Returns

the previous collation element, or NULLORDER when the start of the iteration has been reached.

Attributes

Remarks

Get the previous collation element in the source string.

This iterator iterates over a sequence of collation elements that were built from the string. Because there isn't necessarily a one-to-one mapping from characters to collation elements, this doesn't mean the same thing as "return the collation element [or ordering priority] of the previous character in the string".

This function updates the iterator's internal pointer to point to the collation element preceding the one it's currently pointing to and then returns that element, while next() returns the current element and then updates the pointer.

Java documentation for android.icu.text.CollationElementIterator.previous().

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