Results 1 to 4 of 4

Thread: [RESOLVED] Splitting a string three ways??!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Posts
    395

    Resolved [RESOLVED] Splitting a string three ways??!

    I have this code to split a string into two halves -

    VB Code:
    1. AccountList.ListIndex = 0
    2. emailToUseT.Text = AccountList.List(0)
    3. Temp = Split(emailToUseT.Text, ";")
    4.  
    5. emailT.Text = Temp(0)
    6. passwordT.Text = Temp(1)




    Assume I have this text in a form:

    hello{sep}goodbye{sep}webstring

    or

    hello;goodbye;webstring


    Would obviously turn into:
    hello
    goodbye
    webstring


    How would I split three strings like this?
    8 gigs/ram (hey why not)
    300 gig HD x2
    Windows XP 64

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Posts
    395

    Re: Splitting a string three ways??!

    Well? It seems everyone is skipping my question! BUMP?!
    8 gigs/ram (hey why not)
    300 gig HD x2
    Windows XP 64

  3. #3
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Splitting a string three ways??!

    Your question does not make much sense, atleast to me. You ask to split three strings like you've shown above, which is straightforward and easy to do. So you should format your question better.

    Do you want all the three strings to have their result in one string array? Or what you actually want to have as an end result?


    (Also, bumping this early isn't very good habit, sometimes question gets answered several hours later on. You should wait atleast several hours.)

    Edit!
    And now it is resolved?

  4. #4
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: [RESOLVED] Splitting a string three ways??!

    use Temp(2) for the webstring.
    VB Code:
    1. next = temp(2)
    2. next2 = temp(3)
    3. next3 = temp(4)
    and so on...
    Chris

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