String.GetChars(Int32, Int32, Char[], Int32) 方法

定义

将此字符串中的字符复制到目标字符数组中。

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

参数

srcBegin
Int32

要复制的字符串中第一个字符的索引。

srcEnd
Int32

要复制的字符串中最后一个字符之后的索引。

dst
Char[]

目标数组。

dstBegin
Int32

目标数组中的起始偏移量。

属性

例外

如果为 .,则为buffer null

如果start 、、start > endend > length()index end - start > buffer.length - index

注解

将此字符串中的字符复制到目标字符数组中。

要复制的第一个字符为索引 srcBegin;要复制的最后一个字符为索引 srcEnd-1 (因此要复制的字符总数为 srcEnd-srcBegin索引)。 这些字符将复制到从索引dstBegin开始到索引处结束的子数组dst中:<blockquote>

dstBegin + (srcEnd-srcBegin) - 1

</blockquote>

适用于 . 的 java.lang.String.getChars(int, int, char[], int)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于