Table of Contents

Method IndexOfOccurrence

Namespace
Alternet.Common
Assembly
Alternet.Common.v10.dll

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

s string

Source string to process.

toLookFor char

A Unicode character to seek.

startIndex int

The search starting position.

occurrenceCount int

Returns

int

The zero-based index position of toLookFor from the startIndex of the source string if that string is found, or -1 if it is not.