« Macs on ebay | Home | How to Avoid Economic… »

InStrR Function: Search the last postition of a string in a string


Same as InstrR, but returns the last position, not the first one:
  Function InStrR(Target As String, Find as string) As integer
Dim LastP As integer = 0
Dim P As integer = InStr(Target, Find)

While P>0
LastP = P
P = InStr(LastP + 1, Target, Find)
wend

return LastP
End Function
05 05 10 - 15:03
No comments

  
Remember personal info?

Emoticons / Textile


Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.