PDA

View Full Version : Sort words in a sentences


v221919
Nov 16, 2009, 07:10 AM
I want the program to sort the words in a sentence i.e. in dictionary form and we have to input the string

Perito
Nov 16, 2009, 08:03 AM
You simply parse the line into words (use spaces and punctuation as end-of-word markers). Then, sort the array.

If you put a long text box on a form, you can use that as input. When the user hits <ENTER>, process the line and display the results.