C#查找字符串常用方法

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

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

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

posted @ 2020-11-03 09:07  向前追起  阅读(10127)  评论(0)    收藏  举报