StringUtilities..::..LastIndexOf Method (StringBuilder, String, Nullable<(Of <(<'Int32>)>)>, StringComparison)

Returns the index of the last occurrence of a substring in the StringBuilder, using the specified StringComparison, or -1 if not found.

Namespace:  Tortuga.Anchor
Assembly:  Tortuga.Anchor (in Tortuga.Anchor.dll)

Syntax


public static int LastIndexOf(
	this StringBuilder sb,
	string value,
	Nullable<int> startIndex,
	StringComparison comparisonType
)
<ExtensionAttribute> _
Public Shared Function LastIndexOf ( _
	sb As StringBuilder, _
	value As String, _
	startIndex As Nullable(Of Integer), _
	comparisonType As StringComparison _
) As Integer

Parameters

sb
Type: StringBuilder
The StringBuilder to search.
value
Type: String
The substring to seek.
startIndex
Type: Nullable<(Of <(<'Int32>)>)>
The starting index for the search (searches backward from here).
comparisonType
Type: StringComparison
The StringComparison option to use.

Return Value

The zero-based index position of value if found; otherwise, -1.