語言

StringBuilder.OffsetByCodePoints(Int32, Int32) 方法

定義

回傳與 codePointOffset相偏移index的索引。

[Android.Runtime.Register("offsetByCodePoints", "(II)I", "")]
public override int OffsetByCodePoints(int index, int codePointOffset);
[<Android.Runtime.Register("offsetByCodePoints", "(II)I", "")>]
override this.OffsetByCodePoints : int * int -> int

參數

index
Int32

用來計算偏移量的指數。

codePointOffset
Int32

需要計算的代碼點數。

傳回

索引偏移量為指定數量的 Unicode 碼點。

屬性

例外狀況

如果 index 是負數或大於, Length() 或是前後的碼點 index 數不足以匹配 codePointOffset。

備註

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

另請參閱

  • Character
  • <xref:Java.Lang.Character.OffsetByCodePoints(System.Char%5b%5d%2c+System.Int32%2c+System.Int32%2c+System.Int32%2c+System.Int32)>