C#查找字符串常用方法


Indexof(Char C):  找到第一个字符c的index,如果没找到返回-1

Indexof(string str):  找到str的index,如果没找到返回-1

LastIndexof(string str):  返回当前字符或字符串的最后一个匹配项位置

相关