FUNCTION: InStrRev( )
Implemented in version 2.0
function returns the numeric position of the first occurrence of a specified substring within a specified string when starting from the end (right end) of the string. You can have the search for the substring be sensitive to the case (upper versus lower), or not. The default is to be case sensitive (binary comparison).
An output of zero indicates no match.
There are two mandatory arguments.
argument is the string in which you will search.
argument is the substring you are searching for.
<% =InStrRev("ABCDE ABCDE", "C") %>
There are two optional arguments.
argument is the numeric position, counted from the left, which defines where to start the search for the substring.
In the example the search begins at postion 4, counted from the left, and the search goes from the right to left.
<% =InStrRev("ABCDE ABCDE", "C", 4) %>
argument can be used to set whether the search for the substring is case sensitive (upper versus lower), or not. You must only use either the constant or value of the COMPARISON CONSTANTS.
Compare information inside database
In the example, by using VBBinaryCompare, or 0, for the
argument, all upper/lower case differences are obeyed in both the search.
<% =InStrRev("ABCDE ABCDE", "c", 4, 0) %>
In the example, by using VBTextCompare, or 1, for the
argument, all upper/lower case differences are ignored in the search.
<% =InStrRev("ABCDE ABCDE", "c", 4, VBTextCompare %>
Copyright 1999-2004 by Infinite Software Solutions, Inc. All rights reserved.