IReplaceable.Copy(Int32, Int32, Int32) Method

Definition

Copies a substring of this object, retaining metadata.

[Android.Runtime.Register("copy", "(III)V", "GetCopy_IIIHandler:Android.Icu.Text.IReplaceableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)]
public void Copy (int start, int limit, int dest);
[<Android.Runtime.Register("copy", "(III)V", "GetCopy_IIIHandler:Android.Icu.Text.IReplaceableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
abstract member Copy : int * int * int -> unit

Parameters

start
Int32

the beginning index, inclusive; 0 &lt;= start &lt;= limit.

limit
Int32

the ending index, exclusive; start &lt;= limit &lt;= length().

dest
Int32

the destination index. The characters from start..limit-1 will be copied to dest. Implementations of this method may assume that dest &lt;= start || dest &gt;= limit.

Attributes

Remarks

Copies a substring of this object, retaining metadata. This method is used to duplicate or reorder substrings. The destination index must not overlap the source range. If hasMetaData() returns false, subclasses may use the naive implementation:

char[] text = new char[limit - start];
            getChars(start, limit, text, 0);
            replace(dest, dest, text, 0, limit - start);

Java documentation for android.icu.text.Replaceable.copy(int, int, 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