This article applies to:
This item was introduced in E-Prime 2.0 (126.96.36.199).
InStrRev returns the position of the first occurrence of a string within another. The search begins from the end of string, but the position returned counts from the beginning of the string.
E-Basic has the InStrRev function, similar to the VBA version with the exception that the final parameter comparison permits for case sensitive or not case-sensitive searches.
Syntax: InStrRev search, find, [start], [compare case]
search: The source string
find: the item to find
start: the character to begin the search (1 = begin)
compare case: True/False for case sensitivity
Dim strExample As String
strExample = "The quick brown fox"
Dim nFind As Long
' This will print 13
Debug.Print "The first letter o is at " & InStr(strExample, "o")
' This will print 18
Debug.Print "The last letter o is at " & InStrRev(strExample, "o")
For more information view the E-Prime Command Reference for specifics involving E-Basic (https://pstnet.com/ecr).