Extension method to find the index of the Nth occurrence of a character in a string.
public static int NthIndexOf(string s, char c, int n)
The index of the Nth occurrence if found or -1 if not.
The string to search.
The character to find.
The occurrence to find.
Taken from Wayne Maurer's solution at http://stackoverflow.com/questions/2571716/find-nth-occurrence-of-a-character-in-a-string