M_Cyjb_StringView_LastIndexOf_2 - CYJB/Cyjb GitHub Wiki
返回当前字符串视图中指定字符最后一次出现的索引。
Namespace: Cyjb
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
public int LastIndexOf(
char value,
int startIndex,
int count
)
- value
- Type: System.Char
要检查的字符。 - startIndex
- Type: System.Int32
搜索起始位置。 - count
- Type: System.Int32
要搜索的字符个数。
Type: Int32
value 最后一次出现的索引,如果不存在则返回 -1
。
异常 | 条件 |
---|---|
ArgumentOutOfRangeException | startIndex 或 count 小于零。 |
ArgumentOutOfRangeException | startIndex + count 表示的位置不在当前字符串视图内。 |
查找时使用区分大小写和不区分区域性的序列比较。