Skip to content

M_Cyjb_StringView_IndexOf_3

CYJB edited this page Mar 20, 2024 · 2 revisions

StringView.IndexOf 方法 (Char, StringComparison)

返回当前字符串视图中指定字符首次出现的索引。

Namespace: Cyjb
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6

语法

C#

public int IndexOf(
	char value,
	StringComparison comparisonType
)

参数

 

value
Type: System.Char
要检查的字符。
comparisonType
Type: System.StringComparison
比较中要使用的规则。

返回值

Type: Int32
value 首次出现的索引,如果不存在则返回 -1

参见

Reference

StringView 结构
IndexOf 重载
Cyjb 命名空间

Clone this wiki locally