Jobs
Author: Mathieu Klomp Date Submitted: 3/26/2005 Category: String Handling/Manipulation Compatibility: VB 6 This code has been accessed 6187 times.
Email Yourself this snippet:
No declarations
Code
Function FindString(Source As String, Find As String, Optional MatchCase As Boolean) If MatchCase Then FindString = (Len(Source) - Len(Replace(Source, Find, ""))) / Len(Find) If Not MatchCase Then FindString = (Len(Source) - Len(Replace(LCase(Source), LCase(Find), ""))) / Len(Find) 'Easy, aint it? have fun! Mathieu Klomp. End Function