Function String Manipulations Class

StripDoubleQuotes

Strips surrounding double-quote characters from a string (if they exist).

Signature (Visual Basic / VBA)

Public Function StripDoubleQuotes( _
    ByVal vValue As Variant _
    ) As Variant

Code Example

    StripDoubleQuotes("Other") = "Other"
    StripDoubleQuotes("""Other""") = "Other"
    StripDoubleQuotes("Other""") = "Other"""
    StripDoubleQuotes("""Other") = """Other"
    StripDoubleQuotes(12345) = "12345"
    StripDoubleQuotes("""Larry ""Bud"" Melman""") = "Larry ""Bud"" Melman" ' #6

Parameters

Parameter Description
vValue The string which is to be stripped of surrounding double quotes. Function returns Null if vValue is Null or cannot be fixed up to a String. If the first and last characters of the string are double-quote characters, return the string with those characters removed; otherwise, return vValue unchanged (except that non-String arguments are fixed up to Strings).

Notes & Version History

Warning Does not replace sequences of two double-quote characters in the string with one double quote character, as would be needed for the inverse of the DoubleQuoteString function, as in example #6.