Home Cart [Log In] About Us Contact Us

Object Reference

xf_StringCaseSensitiveString Functions

Public Function LastIndexOf (
str As String,
SubString As String,
Optional StartPosition As Long = -1 ,
Optional Length As Long = -1
) As Long

Get the 1 based index of the last occurrence of the search string in the passed string

str as String

The string to search

SubString as String

The string to match

Optional StartPosition as Long = -1

The position in the string to start searching, -1 for the start of the string

Optional Length as Long = -1

The length of the section of string to search in, -1 for the whole string after StartPosition

Call Template:

Dim i As Long
i = xf.StrCS.LastIndexOf(str, SubString)
i = xf.StrCS.LastIndexOf(str, SubString, StartPosition, Length)

See Also:

Example 1:

xf.Str.LastIndexOf("The King's counting house is the King's", "King")   => 33
xf.Str.LastIndexOf("The King's counting house", "den")                  => -1
xf.Str.LastIndexOf("The King's counting house", "King", 10, 8)          => -1
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd