Add Quotes

By | 2002-06-01

This Function Adds quotes to a filename… especially useful when sending
an arguement to a program (ie a filename) and it has spaces in it (with spaces
if shows up as multiple arguements.

Original Author: Digital

Inputs

str is the String to add quotes to.

Assumptions

No real “user notes” here…except it was a pain to think this one up =)

Returns

The Fixed String

API Declarations

None

Code

Public Function addQuotes(ByVal str As String) As String
    addQuotes = Chr(34) & str & Chr(34)
End Function

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.