|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to devide string to array?hi any body,
how to devide some string like "aaa,bbb,ccc,ddd" to a string array? Is there have any vb function to do that? thanks. xuts wrote:
> hi any body, Dim input As String = "aaa,bbb,ccc,ddd"> how to devide some string like "aaa,bbb,ccc,ddd" to a string array? Is there > have any vb function to do that? input.Split(","c) This will give you an array an array of four strings: "aaa", "bbb", "ccc", and "ddd" -- David Hogue "xuts" <x***@discussions.microsoft.com> wrote in message Dim sInput As String = "aaa,bbb,ccc,ddd"news:062900A8-0E64-4F91-B19B-D4689573FB8A@microsoft.com... > hi any body, > how to devide some string like "aaa,bbb,ccc,ddd" to a string array? Is > there > have any vb function to do that? > > thanks. Dim aArray() sArray = sInput.Split(",") Now, sArray(0) will contain "aaa", sArray(1) will contain "bbb", etc. Cheers. Check out the split function
i.e. ' This will split the string on the comma character Dim str As String = "aaa,bbb,ccc,ddd" Dim arr() As String = str.Split(",") Thanks, Seth Rowe xuts wrote: Show quoteHide quote > hi any body, > how to devide some string like "aaa,bbb,ccc,ddd" to a string array? Is there > have any vb function to do that? > > thanks.
That Eval Question Again...
Simple Eval() (Ithink) question gradient titlebar in vbdotnet Print the RichTextBox Updating Files How to return value in Combobox ListBox, ComboBox Bug??? NullReferenceException on DataGridView.Columns Index property Compiled HTML helpfile does not work when application is installed .NET how to check binary compatability |
|||||||||||||||||||||||