Results 1 to 2 of 2

Thread: How to remove dublicate words in a file?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2008
    Posts
    22

    Question How to remove dublicate words in a file?

    I have a text file that contains:
    alt="black" alt="white" alt="red" alt="green" alt="black"
    alt="red" alt="white"...

    how to make output like this:
    alt="black" alt="white" alt="red" alt="green" ???

  2. #2
    Hyperactive Member Ivenesco's Avatar
    Join Date
    Sep 2007
    Location
    Poland, Lublin
    Posts
    325

    Re: How to remove dublicate words in a file?

    Use queue of strings:
    try word by word - if it is in queue do nothing, if not enqueue it.
    At the end, dequeue all strings.

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