Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reverse search and case-insernsitive search routines
#1
i had a need of a routine to do the opposite of INSTR( in which I wanted to find the last appearance of a search field in the target string. So I wrote the following functions:

  1. '  Reverse instr: finds last position of search in target
    Function Rinstr& (Target As String, Search As String)
  2. ' Case insensitive search
    Function Iinstr& (start As Long, Target As String, Search As String)
  3. ' Case insensitive reverse seaarch
    Function RIinstr& (Target As String, Search As String)

I'm not sure how useful this would be, but I suspect someone is going to need one of these at some point.

The functions include a program that runs a set of tests to confirm they work.


Attached Files
.bas   rinstr.bas (Size: 1.95 KB / Downloads: 51)
While 1
   Fix Bugs
   report all bugs fixed
   receive bug report
end while
Reply


Messages In This Thread
Reverse search and case-insernsitive search routines - by TDarcos - 04-04-2024, 12:35 AM



Users browsing this thread: 1 Guest(s)