字符串匹配函数IndexOf

    技术2022-05-11  70

    String.IndexOf (String, Int32, Int32, StringComparison)

    报告指定的字符串在当前 String 对象中的第一个匹配项的索引。参数指定当前字符串中的起始搜索位置、要搜索的当前字符串中的字符数量,以及要用于指定字符串的搜索类型。

    语法:

    public int IndexOf ( string value, int startIndex, int count, StringComparison comparisonType )  

    最新回复(0)