Returns the first index of the specified character in the string segment.
public int IndexOf(char value)
parameter | description |
---|---|
value | The character to find. |
The first index of the specified character in the string segment, or -1 if the character cannot be found.
Returns the first index of the specified character in the string segment.
public int IndexOf(char value, int startIndex)
parameter | description |
---|---|
value | The character to find. |
startIndex | The search starting position. |
The first index of the specified character in the string segment, or -1 if the character cannot be found.
Returns the first index of the specified string in the string segment.
public int IndexOf(string value, StringComparison sc)
parameter | description |
---|---|
value | The string to find. |
sc | The string comparison options. |
The first index of the specified string in the string segment, or -1 if the string cannot be found.