Gennady wrote:

> Check out String#replace

> class String
>     def capwords!
>         replace split.collect { |word| word.capitalize }.join(" ")
>     end
> end
> 
> Mind that you loose information about original whitespaces, all of them
> are replaced with a single space character.

True.  I didn't think about that, although it [luckily] didn't matter for my
use.  Thanks for pointing out 'replace'.  Despite having the reference and
the pickaxe right in front of me, I missed that one.

Jeremy