String serving text polarizer in vb.net

Before I ask, I just want to say that I looked at it, and I just can't figure it out.
So I have a web call returning an incredibly long line of text that I need to split. I want to use textfieldparser, but I do not want to save this line as a file and textfieldparser seems to be all about files or ... streams, and I don't understand streams. So, how will I feed the string into this? Can I convert it to a stream? I understand that this is probably very simple, so I apologize for my ignorance.

Many thanks for your help!

+4
source share
1 answer

Textfieldparser has a constructor that accepts a TextReader. Have you tried something like this:

Dim t As New FileIO.TextFieldParser(New System.IO.StringReader("thestringinside")) 

You can also look at www.filehelpers.net (never tried, but it looks promising - I am in no way affiliated!), Because the engine also supports the ReadString method

+10
source

Source: https://habr.com/ru/post/1446572/


All Articles