04-04-2024, 12:53 AM
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...
Pete
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