Share via


BreakIterator.Preceding(Int32) Method

Definition

Returns the last boundary preceding the specified character offset.

[Android.Runtime.Register("preceding", "(I)I", "GetPreceding_IHandler")]
public virtual int Preceding (int offset);
[<Android.Runtime.Register("preceding", "(I)I", "GetPreceding_IHandler")>]
abstract member Preceding : int -> int
override this.Preceding : int -> int

Parameters

offset
Int32

the character offset to begin scanning.

Returns

The last boundary before the specified offset or BreakIterator.DONE if the first text boundary is passed in as the offset.

Attributes

Exceptions

if the offset is invalid.

Remarks

Returns the last boundary preceding the specified character offset. If the specified offset is equal to the first text boundary, it returns BreakIterator.DONE and the iterator's current position is unchanged. Otherwise, the iterator's current position is set to the returned boundary. The value returned is always less than the offset or the value BreakIterator.DONE.

Added in 1.2.

Java documentation for java.text.BreakIterator.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