Results 1 to 5 of 5

Thread: Trim strings

Threaded View

  1. #1

    Thread Starter
    Fanatic Member mateo107's Avatar
    Join Date
    Jan 2005
    Posts
    547

    Resolved Trim strings

    I need to read in a txt file into different combo boxes...

    Depending on what the first words are will depend on which combo box it's placed into...

    so, for example, my file (called settings.txt) will be:

    site=USA
    site=Canada
    site=Mexico
    phone=home
    phone=cell
    phone=office

    so, I know I'll have to use a Streamreader and loop through the text, but how do I get it so that it trims off everything before the ='s sign?

    so, my streamreader should read the following and add them to the

    site combobox:
    USA
    CANADA
    Mexico

    phone combobox:
    home
    cell
    office

    Any ideas?
    I know I'll need to loop through and use TRIM but I'm not sure ...
    Last edited by mateo107; Aug 17th, 2007 at 11:02 AM.


    -Matthew-

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