Method IndexOf
IndexOf(String, Int32)
Returns the index within this string of the first occurrence of the
specified codePoint
.
Declaration
public static int IndexOf(this string str, int codePoint)
Parameters
Type | Name | Description |
---|---|---|
System.String | str | this string |
System.Int32 | codePoint | a codePoint representing a single character or surrogate pair |
Returns
Type | Description |
---|---|
System.Int32 | the index of the first occurrence of the character (or surrogate pair) in the string,
or |