RichText.IndexOf

IndexOf(string, int, int, StringComparison)

返回当前实例中指定字符串首次出现的零基索引。

public int IndexOf(string value, int startIndex, int count, StringComparison comparisonType)
参数类型描述
valueString该值。
startIndexInt32起始搜索位置
计数Int32计数。
comparisonTypeStringComparison指定字符串的搜索类型

返回值

Int32。

另请参阅


IndexOf(string, int, StringComparison)

返回当前实例中指定字符串首次出现的零基索引。参数指定当前字符串的起始搜索位置以及用于指定字符串的搜索类型。

public int IndexOf(string value, int startIndex, StringComparison comparisonType)
参数类型描述
valueString该值。
startIndexInt32起始搜索位置
comparisonTypeStringComparison指定字符串的搜索类型

返回值

Int32。

另请参阅


IndexOf(char, int, int)

返回此实例中指定字符首次出现的零基索引。搜索从指定的字符位置开始,并检查指定数量的字符位置。

public int IndexOf(char value, int startIndex, int count)
参数类型描述
valueChar该值。
startIndexInt32起始搜索位置
计数Int32计数。

返回值

Int32。

另请参阅


IndexOf(string, StringComparison)

返回当前实例中指定字符串首次出现的零基索引。参数指定用于指定字符串的搜索类型。

public int IndexOf(string value, StringComparison comparisonType)
参数类型描述
valueString该值。
comparisonTypeStringComparison指定字符串的搜索类型

返回值

Int32。

另请参阅


IndexOf(string, int, int)

返回此实例中指定字符串首次出现的零基索引。搜索从指定的字符位置开始,并检查指定数量的字符位置。

public int IndexOf(string value, int startIndex, int count)
参数类型描述
valueString该值。
startIndexInt32起始搜索位置
计数Int32计数。

返回值

Int32。

另请参阅


IndexOf(char, int)

返回此字符串中指定 Unicode 字符首次出现的零基索引。搜索从指定的字符位置开始。

public int IndexOf(char value, int startIndex)
参数类型描述
valueChar该值。
startIndexInt32起始搜索位置

返回值

Int32。

另请参阅


IndexOf(string)

返回此实例中指定字符串首次出现的零基索引。

public int IndexOf(string value)
参数类型描述
valueString该值。

返回值

Int32。

另请参阅


IndexOf(char)

返回此字符串中指定 Unicode 字符首次出现的零基索引。

public int IndexOf(char value)
参数类型描述
valueChar该值。

返回值

Int32。

另请参阅


IndexOf(string, int)

返回此实例中指定字符串首次出现的零基索引。搜索从指定的字符位置开始。

public int IndexOf(string value, int startIndex)
参数类型描述
valueString该值。
startIndexInt32起始搜索位置

返回值

Int32。

另请参阅