Find Occurence index(s) of substring within a string
Description: method to find number of occurences of a string and index of, within another string
Link: http://www.codekeep.net/snippets/240bbe37-3efd-413f-bd42-aefdbb2e3451.aspx
private static int[] StringContainsIndexOf(string subString, string fullString)
{
ArrayList arrList = new ArrayList();
for (int i = 0; i < fullString.Length; i++)
{
int loc = fullString.IndexOf(subString, i);
if (loc == -1)
break;
arrList.Add(loc);
i = loc;
}
int[] output = new int[arrList.Count];
for (int i = 0; i < arrList.Count; i++)
output[i] = (int)arrList[i];
return output;
}






