Method IndexOf
IndexOf(StringBuilder, String)
Get the index of the first match of a string
Declaration
public static int IndexOf(this StringBuilder haystack, string needle)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | haystack | The StringBuilder to use |
| String | needle | The string to search |
Returns
| Type | Description |
|---|---|
| Int32 | The index of the first match |
Remarks
This has been shamelessly copy pasted from here: https://stackoverflow.com/questions/12261344/fastest-search-method-in-stringbuilder
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |