''
'' FF_WRAP
'' Add paired characters to the beginning and end of a string.
''
'' It is particularly useful for enclosing text with parenthesess,
'' quotes, brackets, etc.
'' For example: FF_Wrap("Paul", "<", ">") results in <Paul>
''
'' If only one wrap character/string is specified then that character
'' or string is used for both sides.
'' For example: FF_Wrap("Paul", "'") results in 'Paul'
''
'' If no wrap character/string is specified then double quotes are used.
'' For example: FF_Wrap("Paul") results in "Paul"
''
Function FF_Wrap Overload ( ByRef sMainString As String, _
ByRef sLeftChar As String, _
ByRef sRightChar As String _
) As String
Function = sLeftChar & sMainString & sRightChar
End Function
Function FF_Wrap Overload ( ByRef sMainString As String, _
ByRef sLeftChar As String = Chr(34) _
) As String
Function = sLeftChar & sMainString & sLeftChar
End Function
In my opinion, FF_Wrap provides a little more versatility than PB's version because you can use 1, 2, or 3 parameters.