Split by ControlChars.Tab : String Split « Data Types « VB.Net






Split by ControlChars.Tab

    

Public Class MainClass
   Public Shared Sub Main()
      Dim lineInput As String = "this is a \ttest"
      
      Dim fields() As String = lineInput.Split(ControlChars.Tab)
      Dim isFirstField As Boolean = True
      Dim item As String
      For Each item In  fields
        If isFirstField Then
           isFirstField = False
        Else
           Console.Write(",")
        End If
        Try
           Console.Write(Convert.ToByte(Convert.ToBoolean(item)))
        Catch
           Console.Write(item)
        End Try
      Next item
   End Sub
End Class

   
    
    
    
  








Related examples in the same category

1.String SplitString Split
2.String.Split Method (Char[])
3.String.Split Method (Char[], Int32)
4.String.Split Method (Char[], Int32, StringSplitOptions)
5.Split a string delimited by characters and return all elements
6.Split a string delimited by characters and return all non-empty elements
7.Split string into string and empty string
8.StringSplitOptions.RemoveEmptyEntries
9.Split a string delimited by another string and return all elements
10.Split the original string at the delimiter and return all non-empty elements
11.String.Split (Char[], StringSplitOptions) (System)_VB.htm
12.Split with string arrays
13.String.Split (String[], StringSplitOptions)