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)>