RichText.IndexOf

IndexOf(string, int, int, StringComparison)

返回指定字符串在当前实例中第一次出现的从零开始的索引。

public int IndexOf(string value, int startIndex, int count, StringComparison comparisonType)
范围类型描述
valueString值。
startIndexInt32起始搜索位置
countInt32计数。
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起始搜索位置
countInt32计数。

返回值

的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起始搜索位置
countInt32计数。

返回值

的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.

也可以看看