String Manipulation

csharp United States
  • 17 years ago

    I have a tuff question, and ill give anyone my first born child for an answer. Im reading a comma delimited text file. So i have strings that I read in that look like this, "test", "test2", "test3", well here is my problem. The file gets screwed up from time to time and throws in extra quotes whereever it wants. So I often get this ""test, """"test2"", .
    Im using the split function with a string array to split the line when i read it in, but i need to know how to remove those damn quotes from the strings. I have tried using the trim function and the replace function to no avail. Any help would be greatly appreciated.


    Thanks,
    Ryan

  • 17 years ago

    why not just split by the commas and do .Replace("\"","");   ?


    What does that do that you don't want?



    greetings,
    - Mike

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil perpetrated by skilled but perverted professionals.” - Jon Ribbens