Method IndexOf
IndexOf(StringBuilder, String)
Searches for the first index of the specified character. The search for the character starts at the beginning and moves towards the end.
Declaration
public static int IndexOf(this StringBuilder text, string value)
Parameters
Type | Name | Description |
---|---|---|
StringBuilder | text | This |
System.String | value | The string to find. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the specified character, or -1 if the character isn't found. |
IndexOf(StringBuilder, String, Int32)
Searches for the index of the specified character. The search for the character starts at the specified offset and moves towards the end.
Declaration
public static int IndexOf(this StringBuilder text, string value, int startIndex)
Parameters
Type | Name | Description |
---|---|---|
StringBuilder | text | This |
System.String | value | The string to find. |
System.Int32 | startIndex | The starting offset. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the specified character, or -1 if the character isn't found. |