Remove double quotes

  • Thread starter Thread starter Jared
  • Start date Start date
J

Jared

What the hell is going on here?

Dim s As String
s = "ja""red"
Trace.WriteLine(s.Replace("""","")
 
What the hell is going on here?

Dim s As String
s = "ja""red"
Trace.WriteLine(s.Replace("""","")

Double quotes (") are removed from the string, so the end result
should be "jared".

Within a VB string literal, you use "" as the escape sequence to
represent a single ". So if you print the strings, "ja""red" will
print as ja"red and """" is ".


Mattias
 
" = char(34)
" = char(147)

VB.NET is returning different ascii values for quote symbols, so I wil need
to increase my logic.
 
Back
Top