VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Function to find the last occurrence of one string within another

by Anonymous (267 Submissions)
Category: String Manipulation
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Wed 27th January 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Function to find the last occurrence of one string within another

Rate Function to find the last occurrence of one string within another



    
    Dim P As Long, LastP As Long, Start As Long
    
    P = InStr(1, sTarget, sFind, iCompare)
    Do While P
        LastP = P
        P = InStr(LastP + 1, sTarget, sFind, iCompare)
    Loop
    InStrR = LastP
    
End Function

Download this snippet    Add to My Saved Code

Function to find the last occurrence of one string within another Comments

No comments have been posted about Function to find the last occurrence of one string within another. Why not be the first to post a comment about Function to find the last occurrence of one string within another.

Post your comment

Subject:
Message:
0/1000 characters