VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

StrCount function

Bjorn van den Heuvel  (1 Submission)   String Manipulation   Visual Basic 5.0   Advanced   Wed 3rd February 2021

Function that counts the occurrance of a given phrase in a larger string.
(I needed this function and couldn't find anything like it in MSDN for VB)

Inputs
cToSearch: The string to search. cSearchPhrase: The phrase to count

Assumes
Included the check on the length of the SearchPhrase, in order to prevent a division by zero.

Returns
The number of occurrances found.

Rate StrCount function (7(7 Vote))
StrCount function.bas

StrCount function Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters