Method IndexOfBytes
IndexOfBytes(string, string)
Searches a string for an occurrence of a substring and returns the UTF-8 byte index (zero-based) of the first occurrence.
public static int IndexOfBytes(this string s, string value)
Parameters
Returns
- int
The byte index of the first occurrence, or -1 if not found.
IndexOfBytes(string, string, int)
Searches a string for an occurrence of a substring and returns the UTF-8 byte index (zero-based) of the first occurrence.
public static int IndexOfBytes(this string s, string value, int startIndex)
Parameters
Returns
- int
The byte index of the first occurrence, or -1 if not found.
IndexOfBytes(string, string, int, int)
Searches a string for an occurrence of a substring and returns the UTF-8 byte index (zero-based) of the first occurrence.
public static int IndexOfBytes(this string s, string value, int startIndex, int count)
Parameters
Returns
- int
The byte index of the first occurrence, or -1 if not found.