splitting a string

前端 未结 6 1993
不思量自难忘°
不思量自难忘° 2021-01-26 16:52

i have the following string:

http://pastebin.com/d29ae565b

i need to separate each value and put it in an array. typically it would be done by \".split\". howeve

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-26 17:31

    You could use a TextReader read each line separatedly and split the string as needed.

    Function GetNumbers(reader As TextReader) As String()
    
        Dim lst As New List(Of String)
    
        Do While Not reader.EndOfStream
            lst.AddRange(reader.ReadLine().Split(vbTab))
        Loop
    
        Return lst.ToArray()
    
    End Function
    

提交回复
热议问题