Results 1 to 3 of 3

Thread: how to split input in to 3 parts

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    7

    how to split input in to 3 parts

    ok i've got an input code that the user enters in to the program but i need to split it in to 3 differnt sections but i cant figure out how to do it can anyone help? e.g. 122131 needs to be 12 21 31

  2. #2
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: how to split input in to 3 parts

    is it always going to be 3 sections of 2 characters each? If so just use

    Code:
    InputString= "1222131"
    Part1 = InputString.Substring(0,2)
    Part2 = InputString.Substring(2,2)
    Part3 = InputString.Substring(4,2)

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2009
    Posts
    7

    Re: how to split input in to 3 parts

    brilliant thanks

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