Good catch! Had to think about that for a minute..

In case you don't see the reason for the change that DrillSargeant made, consider:

A string with three consecutive spaces would have the first two reduced to one, which would then be joined, resulting in two consecutive spaces - the pair replaced by the single, and the remaining odd (third) space. This would occur if you had any odd number of consecutive spaces above one. The loop keeps checking and reducing double spaces to single spaces.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D