String.OffsetByCodePoints(Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳與 String by index 代碼codePointOffset點相偏移的索引。
[Android.Runtime.Register("offsetByCodePoints", "(II)I", "")]
public int OffsetByCodePoints(int index, int codePointOffset);
[<Android.Runtime.Register("offsetByCodePoints", "(II)I", "")>]
member this.OffsetByCodePoints : int * int -> int
參數
- index
- Int32
要偏移的索引
- codePointOffset
- Int32
碼點的偏移量
傳回
此索引 String
- 屬性
例外狀況
如果 index 是負數或大於, length() 或是前後的碼點 index 數不足以匹配 codePointOffset。
備註
回傳與 String by index 代碼codePointOffset點相偏移的索引。 在文字indexcodePointOffset範圍內的未配對替代者,每個代體都算作一個代碼點。
已在1.5中新增。
Java 文件 java.lang.String.offsetByCodePoints(.*int, .*int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。