Guest Cheung Posted May 16, 2002 Posted May 16, 2002 Do you know any function that change ' (single quote) to '' (2 single quotes) in a string? Quote
*Gurus* divil Posted May 16, 2002 *Gurus* Posted May 16, 2002 There aren't escape characters in VB.NET. You can use two double quotes ("") next to each other to have an inline double quote in a string, e.g. strString = "This ""word"" is enclosed in double quotes." Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Guest Cheung Posted May 16, 2002 Posted May 16, 2002 Any function to do this for me? function input string = It isn't bad function output string = It isn''t bad Thx! Quote
*Gurus* divil Posted May 16, 2002 *Gurus* Posted May 16, 2002 Oh, I misunderstood. Use the Replace() function. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Guest Perl Posted May 16, 2002 Posted May 16, 2002 Dim MyString as String = "'Hello My Name Is Simon'" MyString.replace( "'", Chr(34) ) *Should Work* :) Or you could just write it out using Chr(34) but who wants to do that ? :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.