'********************************************************************

'* Function LAddText

'*

'*   Author: NetworkAdminKB.com

'*  Created: 2004-11-12

'* Modified: 2008-12-05

'*

'* Purpose: Returns a string with the text added to the Left side of

'*           the String, only if it does not already exist.

'*

'*   Input: strText = The string to have the Text Added to.

'*           strAdd = The string to Add to the Left side of strText.

'*

'*  Output: Returns the string plus the text added to the left

'*            side of the string, only if the text does not

'*            already exist.

'*

'* Calls:

'* ReturnCaseComparisonValue

'*

'* Changes:

'* 2008-12-05: Added ReturnCaseComparisonValue and blnCase

'********************************************************************

Function LAddText(ByVal strText, ByVal strAdd, ByVal blnCase)

  'Version 1.1 2008-12-05

  Dim intLen, strTemp

  

  If InStr(1, strText, strAdd, ReturnCaseComparisonValue(blnCase)) = 1 Then

    strTemp = strText

  Else

    strTemp = strAdd & strText

  End If 'InStr(1, strText, strAdd, ReturnCaseComparisonValue(blnCase)) = 1

 

  LAddText = strTemp

End Function 'LAddText

Article ID: 402, Created On: 9/25/2011, Modified: 9/25/2011