Results 1 to 4 of 4

Thread: Array split in VB.NET

  1. #1
    Join Date
    Feb 2009
    Posts
    62

    Array split in VB.NET

    How to split array in VB.NET? What is the syntax form split function? Where to use the split function? Can Splits function separate the defined element by , or / ?

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: Array split in VB.NET

    Split function is use to split a string declare in declaration part into separate elements based on a delimiter (such as a comma or space) and stores the resulting elements in a zero-based array. Often times it is necessary to take a string and dice it up in order to extract portions to be used for some obscure purpose. Enter the Split() function. Split is a very easy concept to grasp.

  3. #3
    Join Date
    Jan 2009
    Posts
    199

    Re: Array split in VB.NET

    Example of Split String into Array :
    Code:
    Dim words() As String
    words() = Split(s)
    
    Dim strarr As String
    For i = 0 To UBound(words)
        ' Eliminate punctuation
        strarr = Replace(words(i), ".", "")
        strarr = Replace(tempStr, ",", "")
        strarr = Replace(tempStr, ":", "")
        If Len(tempStr) > 0 Then
           lis.AddItem strarr
        End If
    Next

  4. #4
    Join Date
    Dec 2008
    Posts
    177

    Re: Array split in VB.NET

    Split Function in vb.net: Returns a zero-based, one-dimensional array containing a specified number of substrings.

    Syntax :

    Split(expression[, delimiter[, limit[, compare]]])

Similar Threads

  1. Replies: 7
    Last Post: 03-08-2010, 11:42 AM
  2. C# array help
    By Daren in forum Software Development
    Replies: 5
    Last Post: 03-01-2010, 07:12 AM
  3. Assigning an array to an array
    By MACE in forum Software Development
    Replies: 3
    Last Post: 18-11-2009, 05:19 PM
  4. XML to ARRAY
    By Vandam in forum Software Development
    Replies: 3
    Last Post: 29-06-2009, 06:14 PM
  5. Replies: 1
    Last Post: 25-04-2009, 05:17 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,103,087.10302 seconds with 16 queries