This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
InStrRev Function
Returns the position of an occurrence of one string within another, from the end of string.
InstrRev(stringcheck, stringmatch[, start[, compare]])
Arguments
- stringcheck
- Required. being searched.
- stringmatch
- Required. String expression being searched for.
- start
- Optional. that sets the starting position for each search. If omitted, –1 is used, which means that the search begins at the last character position.
- compare
- Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. If omitted, a binary comparison is performed. See Settings section for values.
Settings
The compare argument can have the following values:
Constant |
Value |
Description |
BinaryCompare |
0 |
Performs a binary comparison. |
TextCompare |
1 |
Performs a textual comparison. |
Return Values
InStrRev returns the following values:
If |
InStrRev returns |
stringcheck is zero-length |
0 |
stringmatch is zero-length |
start |
stringmatch is not found |
0 |
stringmatch is found within stringcheck |
Position at which match is found |
start > Len(stringmatch) |
0 |
Remarks
Note that the syntax for the InstrRev function is not the same as the syntax for the Instr function.
See Also