YStringExtentionMethodsIndexOfPrevious Method
|
Get the previous index of the given value string in the str string from the startIndex index.
Namespace: Upsilon.Common.LibraryAssembly: Upsilon.Common.Library (in Upsilon.Common.Library.dll) Version: 2.2.2+14985a67b419f90e14e6b1bde61d18cf6cf12b27
Syntax public static int IndexOfPrevious(
this string str,
string value,
int startIndex = -1
)
Parameters
- str String
- The string to search in.
- value String
- The value to search.
- startIndex Int32 (Optional)
- The start index. Default value is -1 and then the search will start at from the end of the str.
Return Value
Int32Returns the index of the previous occurence of the
value string or
-1 if not found.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also