|
Visual Basic (VB and VBA) |
|
Copyright 1999-2001 Christopher Greaves. All rights reserved. Home Page and email to [email protected] |
| If in doubt, record a macro and inspect the entrails! |
Please read the DISCLAIMER.
Here is an INDEX to all the procedures.
You will probably need one copy of my GLOBAL DECLARATIONS.
Public Function OldboolMaskCompare(strMask As String, strCandidate As String) As Boolean
' Procedure : boolMaskCompare
' Description: Return TRUE if the candidate matches the mask
' Copyright: Chris Greaves Inc.
' Inputs: A mask, string, a candidate string.
' Returns: Boolean.
' Assumes: Nothing
' Side Effects: None.
' Tested: By the calls shown below.
' Given a mask (optionally with * and ? strings) and a candidate as a string,
' return TRUE if the candidate matches the mask
' The mask can start with an *, a ? or another character
' The mask is not assumed to contain any mask characters.
' In the event that no mask characters are present, a straight comparison is offered.
' For each starting position in the candidate, until success is achieved, try to match against the mask string.
Dim lngC As Long
lngC = 1
While (lngC <= Len(strCandidate)) And (Not OldboolMaskCompare)
OldboolMaskCompare = boolMaskCompareAt(strMask, strCandidate, lngC)
lngC = lngC + 1
Wend
End Function
| We all knew nothing when we started … |
|
Home Page and Contact Information Send email to [email protected]. This page was last updated Thursday, November 15, 2001 |