As above. For example, if I wanted to find "hi" inside "lorem ipsum hi amet". I know ASP.Net has a function for this - Contains(). Thanks in advance.
Hello, Following is an example: Dim SearchString, SearchChar, MyPos SearchString ="XXpXXpXXPXXP" ' String to search in. SearchChar = "P" ' Search for "P". MyPos = InstrRev(SearchString, SearchChar, 10, 0) ' A binary comparison starting at position 10. Returns 9. MyPos = InstrRev(SearchString, SearchChar, -1, 1) ' A textual comparison starting at the last position. Returns 12. MyPos = InstrRev(SearchString, SearchChar, 8) ' Comparison is binary by default (last argument is omitted). Returns 0. Code (markup): You can also used InStrRev Function Returns the position of an occurrence of one string within another, from the end of string.