K
kurt sune
The code:
Dim aLine As String = "cat" & vbNewLine & "dog" & vbNewLine & "fox" &
vbNewLine
Dim csvColumns1 As String() = aLine.Split(vbNewLine, vbCr, vbLf)
Dim csvColumns2 As String() = Microsoft.VisualBasic.Strings.Split(aLine,
vbNewLine, -1, CompareMethod.Binary)
returns in csvColumns1 7 elements, cat emptystring dog emptystring fox
emptystring emptystring
returns in csvColumns2 4 elements, cat dog fox emptystring
Questions:
why all emptystrings in the first array?
why the last emptystring in the second array?
how do I most easily get rid of them?
/k
Dim aLine As String = "cat" & vbNewLine & "dog" & vbNewLine & "fox" &
vbNewLine
Dim csvColumns1 As String() = aLine.Split(vbNewLine, vbCr, vbLf)
Dim csvColumns2 As String() = Microsoft.VisualBasic.Strings.Split(aLine,
vbNewLine, -1, CompareMethod.Binary)
returns in csvColumns1 7 elements, cat emptystring dog emptystring fox
emptystring emptystring
returns in csvColumns2 4 elements, cat dog fox emptystring
Questions:
why all emptystrings in the first array?
why the last emptystring in the second array?
how do I most easily get rid of them?
/k