WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

String Manipulation

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

String Count

 Keywords: StrCount 

#DefineFunction udfStrCount (sSource, iStart, iStop, sSearch, iMatchcase)
sSource = StrSub(sSource,iStart,iStop-iStart+1)
If sSource=="" Then Return 0
If sSearch=="" Then Return 0
If !iMatchcase
   sSource = StrLower(sSource)
   sSearch = StrLower(sSearch)
EndIf
Return ((StrLen(sSource) - StrLen(StrReplace(sSource,sSearch,""))) / StrLen(sSearch))
#EndFunction

Article ID:   W16254
File Created: 2004:03:30:15:43:36
Last Updated: 2004:03:30:15:43:36