String.GetChars(Int32, Int32, Char[], Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將此字串的字元複製到目標字元陣列中。
[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 , end > length(), start >
end, index , end - start > buffer.length -
index
備註
將此字串的字元複製到目標字元陣列中。
第一個要複製的字元位於索引 srcBegin;最後一個要複製的字元位於索引 srcEnd-1 (因此要複製的字元總數為 srcEnd-srcBegin)。 字元被複製到子 dst 陣列中,從索引 dstBegin 開始,結束於索引: <blockquote>
dstBegin + (srcEnd-srcBegin) - 1
</區塊引用>
Java 文件 java.lang.String.getChars(int, int, char[], int)。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。