Even simpler... just use
Spaces at the start and the end of the string are ignored. To get the number of whitespace chunks, simply subtract one from the number of words (assuming you are interested in the number of white spaces rather than the number of space characters). Have I won a prize now?
- Peter
[This message has been edited by Peter den Haan (edited October 16, 2001).]