'********************************************************************
'*
'* Function IsFirstChar
'*
'* Author: NetworkAdminKB.com
'* Created: 2005-06-23
'* Modified: 2008-12-03
'*
'* Purpose: Returns True if the First Character(s) of a string matches the
'* the string provided.
'*
'* Input: strSearch = A string to be searched.
'* strMatch = A string/Character to search for in strSearch.
'* blnCase = A boolean indicating case sensitive searches
'* True = Case Sensitive Search
'* False = Case Insensitive Search
'*
'* Output: Returns True if the First Character(s) of a string matches the
'* the string provided.
'* Returns False of the string does not match, or one of the
'* parameters passed has a length of 0.
'*
'* Calls:
'* ReturnCaseComparisonValue
'*
'* Changes:
'* 2008-12-03: Removed intSearch and use ReturnCaseComparisonValue instead.
'********************************************************************
Function IsFirstChar(ByVal strSearch, ByVal strMatch, ByVal blnCase)
'Verision 1.2 2008-12-03
Dim intLenMatch, intLenSearch, blnReturn
intLenSearch = Len(strSearch)
intLenMatch = Len(strMatch)
blnReturn = False
If (intLenSearch > 0) AND (intLenMatch > 0) Then
If InStr(1, strSearch, strMatch, ReturnCaseComparisonValue(blnCase)) = 1 Then
blnReturn = True
End If 'InStr(1, strSearch, strMatch, ReturnCaseComparisonValue(blnCase)) = 1
Else
'Do nothing
End If '(intLenSearch > 0) AND (intLenMatch > 0)
IsFirstChar = blnReturn
End Function 'IsFirstChar
Article ID: 399, Created On: 9/25/2011, Modified: 9/25/2011