Method IndexOfOccurrence
IndexOfOccurrence(string, char, int, int)
Reports the zero-based index of the occurrenceCount occurrence of the specified character in this instance. The search starts at a specified character position.
public static int IndexOfOccurrence(this string s, char toLookFor, int startIndex, int occurrenceCount)
Parameters
sstringSource string to process.
toLookForcharA Unicode character to seek.
startIndexintThe search starting position.
occurrenceCountint
Returns
- int
The zero-based index position of
toLookForfrom thestartIndexof the source string if that string is found, or -1 if it is not.