Language

TextUtils.GetOffsetBefore Method

Definition

Overloads

Name Description
GetOffsetBefore(ICharSequence, Int32)

Finds the preceding text offset without splitting a surrogate pair or replacement span.

GetOffsetBefore(String, Int32)

Finds the preceding text offset without splitting a surrogate pair.

GetOffsetBefore(ICharSequence, Int32)

Finds the preceding text offset without splitting a surrogate pair or replacement span.

[Android.Runtime.Register("getOffsetBefore", "(Ljava/lang/CharSequence;I)I", "")]
public static int GetOffsetBefore(Java.Lang.ICharSequence? text, int offset);
[<Android.Runtime.Register("getOffsetBefore", "(Ljava/lang/CharSequence;I)I", "")>]
static member GetOffsetBefore : Java.Lang.ICharSequence * int -> int

Parameters

text
ICharSequence

The text in which to move backward.

offset
Int32

The current character offset.

Returns

The preceding offset, skipping a surrogate pair or replacement span as a unit, or zero when already at the start.

Attributes

Remarks

Android reference for android.text.TextUtils.getOffsetBefore.

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

GetOffsetBefore(String, Int32)

Finds the preceding text offset without splitting a surrogate pair.

public static int GetOffsetBefore(string? text, int offset);
static member GetOffsetBefore : string * int -> int

Parameters

text
String

The text in which to move backward.

offset
Int32

The current character offset.

Returns

The preceding offset, moving over a complete surrogate pair when present, or zero when already at the start.

Remarks

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