Method IndexOfBytes
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
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
s
string
The string.
value
string
The value.
Returns
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
s
string
The string.
value
string
The value.
startIndex
int
The start index.
Returns
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
s
string
The string.
value
string
The value.
startIndex
int
The start index.
count
int
The count.
Returns
The byte index of the first occurrence, or -1 if not found.