Language

CharBuffer.GetChars(Int32, Int32, Char[], Int32) Method

Definition

Copies a range of characters from this buffer's remaining sequence into an array.

[Android.Runtime.Register("getChars", "(II[CI)V", "GetGetChars_IIarrayCIHandler", ApiSince=37)]
public virtual void GetChars(int srcBegin, int srcEnd, char[] dst, int dstBegin);
[<Android.Runtime.Register("getChars", "(II[CI)V", "GetGetChars_IIarrayCIHandler", ApiSince=37)>]
abstract member GetChars : int * int * char[] * int -> unit
override this.GetChars : int * int * char[] * int -> unit

Parameters

srcBegin
Int32

The index of the first character to copy, relative to the current buffer position. Must be non-negative and no greater than srcEnd.

srcEnd
Int32

The index after the last character to copy, relative to the current buffer position. Must not exceed Length().

dst
Char[]

The array that receives the characters. Must not be null.

dstBegin
Int32

The non-negative destination index at which to start writing. The array must have room for srcEnd minus srcBegin characters.

Implements

Attributes

Remarks

The source range includes srcBegin and excludes srcEnd. Source indices are relative to the current position, not the start of the buffer. This operation does not change the buffer's position.

An invocation of this method behaves the same as an invocation of Get(Int32, Char[], Int32, Int32) with the index Position() + srcBegin, the array dst, the offset dstBegin, and the length srcEnd - srcBegin.

Android reference for CharBuffer.getChars.

Applies to