Results 1 to 2 of 2

Thread: [2008] Splitting a string

  1. #1

    Thread Starter
    Hyperactive Member MeTTa@'s Avatar
    Join Date
    Aug 2005
    Posts
    312

    [2008] Splitting a string

    Ive looked it up, nothing really worked on 2008, i have a string thats always the same length, and want to split it up into variables.

    The string looks like

    0-555-555

    I have 3 designated variables for each number, and i dont want to put them into an array. Any nice functions?

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: [2008] Splitting a string

    Use the split function:

    Code:
            Dim s As String = "0-555-555"
            Dim strings() As String = s.Split("-"c)
    
            Dim var1 As String = strings(0)
            Dim var2 As String = strings(1)
            Dim var3 As String = strings(2)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width