Andries Bos wrote: > a simple question, but I can't remember the answer. > > I'm scrolling through a list of strings one by one (e.g. all words in > a rich edit) and I want to count how much unique words I have and how > often these words have been used.
This isn't really something you need to "remember" how to do. You could figure it out. Which part of the task are you having trouble with? Keep some kind of data structure that maps strings to integers. Each time you encounter a word, find it in that data structure and increment the associated integer, or add a new item to the data structure if you don't find that word. -- Rob

