J johnvista Member Joined Jun 16, 2006 Messages 6 Programming Experience Beginner Jun 17, 2006 #1 I have got a string in VB.NET 2005, and whats really annoying is its like this "mytext*ghfhfgg*fdgfdgd" How can I remove the " from the start and end of the string so it becomes: mytext*ghfhfgg*fdgfdgd Ty
I have got a string in VB.NET 2005, and whats really annoying is its like this "mytext*ghfhfgg*fdgfdgd" How can I remove the " from the start and end of the string so it becomes: mytext*ghfhfgg*fdgfdgd Ty
C Craig Well-known member Joined Oct 15, 2005 Messages 110 Location United Kingdom Programming Experience Beginner Jun 17, 2006 #2 you can use Chr(34) as " Upvote 0 Downvote
J johnvista Member Joined Jun 16, 2006 Messages 6 Programming Experience Beginner Jun 17, 2006 #3 t Str = Str.Replace(Chr(34), "") thanks Upvote 0 Downvote
jmcilhinney VB.NET Forum Moderator Staff member Joined Aug 17, 2004 Messages 15,035 Location Sydney, Australia Programming Experience 10+ Jun 18, 2006 #4 You don't use Replace because you only want to remove leading and trailing characters. The correct method to do that is Trim: VB.NET: Str = Str.Trim(""""c) Upvote 0 Downvote
You don't use Replace because you only want to remove leading and trailing characters. The correct method to do that is Trim: VB.NET: Str = Str.Trim(""""c)