Split function analyzed string and divide string based on a certain character (such as a comma or space). Certain character is an optional delimiter character that identifying the string. By default, space " "c assume as a delimiter. It returns and stores a zero based, one-dimensional array containing a specified number of substrings.Figure 1In below code, I am using Split function to show you how its work first code replace blank space " " c with and in second code it's replaced by vbLf see below figure 2.Code: Imports System.GlobalizationImports System.ThreadingModule Module1 Sub Main() Dim split As String() Dim value As String Dim info As CultureInfo = Thread.CurrentThread.CurrentCulture Dim text As TextInfo = info.TextInfo Console.WriteLine("Enter your Name and Address. ") value = Console.ReadLine() Console.WriteLine() split = value.Split(" "c) Console.WriteLine(text.ToTitleCase(split(0)) & "." & text.ToTitleCase(split(1))) Console.Write(vbLf & "Name :" & text.ToTitleCase(split(0)) & vbLf & "Address :" & text.ToTitleCase(split(1))) Console.ReadLine() End SubEnd ModuleOutput: Figure 2
String. Split () in vb.net
Replace method in vb.net