Edits.Iterator.ReplacementIndex Method

Definition

The start index of the current span in the replacement string; the span has length #newLength.

[Android.Runtime.Register("replacementIndex", "()I", "", ApiSince=29)]
public int ReplacementIndex ();
[<Android.Runtime.Register("replacementIndex", "()I", "", ApiSince=29)>]
member this.ReplacementIndex : unit -> int

Returns

the current index into the replacement-characters-only string, not counting unchanged spans

Attributes

Remarks

The start index of the current span in the replacement string; the span has length #newLength. Well-defined only if the current edit is a change edit.

The <em>replacement string</em> is the concatenation of all substrings of the destination string corresponding to change edits.

This method is intended to be used together with operations that write only replacement characters (e.g., CaseMap#omitUnchangedText()). The source string can then be modified in-place.

Java documentation for android.icu.text.Edits.Iterator.replacementIndex().

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