| Parameter | Description |
|---|---|
| fs | A string to search. |
| rune | A single UTF-8 Unicode Rune to search for within this string. |
int The index of the first occurrence of the byte sequence in this string. Returns -1 if no occurrence is found.
Returns the index of the first occurrence of a single Unicode rune in this string.
| Parameter | Description |
|---|---|
| fs | A string to search. |
| bytes | A byte sequence to search for within this string. |
| bytesLen | The number of bytes in the byte sequence. |
int The index of the first occurrence of the byte sequence in this string. Returns -1 if no occurrence is found.
Returns the index of the first occurrence of a byte sequence in this string.
| Parameter | Description |
|---|---|
| fs | A string to search. |
| bytes | A byte sequence to search for within this string. |
| bytesLen | The number of bytes in the byte sequence. |
| startIndex | The first index in this string to consider as the first byte of the byte sequence. |
| distance | The last index in this string to consider as the first byte of the byte sequence. |
int The index of the first occurrence of the byte sequence in this string. Returns -1 if no occurrence is found.
Returns the index of the first occurrence of a byte sequence within a subrange of this string.
| Parameter | Description |
|---|---|
| fs | A string to search. |
| other | A substring to search for within this string. |
int The index of the first occurrence of the second string within this string. Returns -1 if no occurrence is found.
Returns the index of the first occurrence of a substring within this string.
| Parameter | Description |
|---|---|
| fs | A string to search. |
| other | A substring to search for within this string. |
| startIndex | The first index in this string to consider as an occurrence of the second string. |
| distance | The last index in this string to consider as an occurrence of the second string. |
int The index of the first occurrence of the substring within this string. Returns -1 if no occurrence is found.
Returns the index of the first occurrence of a substring within a subrange of this string.