From: Jeremy Date: 2003-03-13T10:16:51+09:00 Subject: Re: How to add a destructive method to the String class... 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