Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reverse search and case-insernsitive search routines
#3
Glad to see I'm not the only one who is Wikilliterate around here. Anyway, kudos for writing your own version. I dd the same several years back, before _INSTRREV came along. It's a big help for word wrap in WP apps. I had a bit of a go-around with Fell when _INSTRREV first came out, regarding the seed parameter. _INSTRREV keeps the same forward seed counting as INSTR. There are reasons for that, which slip my mind at the moment, but I do recall I made an easy workaround, so it could seed backwards. Compare these two...

Code: (Select All)
For i = 1 To 8
    Print i; _InStrRev(i, "12*456*8", "*")
Next

For i = 1 To 8
    Print i; _InStrRev(Len("12*456*8") - i + 1, "12*456*8", "*")
Next

Pete
Reply


Messages In This Thread
RE: Reverse search and case-insernsitive search routines - by Pete - 04-04-2024, 12:53 AM



Users browsing this thread: 1 Guest(s)