posList = new List<int>();
int position = 0; //查找开始位置
int strLen = str.Length; //str的长度
int findStrLen = findStr.Length; //要查找的字符串长度
int index = -1; //字符串查找的返回值
while (position <= strLen)
{
index = str.IndexOf(findStr, position); //从position位置开始查找字符串,找不到就会返回-1