From: Xavier Noria Date: 2009-07-20T21:31:33+09:00 Subject: Re: How to strip inner whitespace in rails On Mon, Jul 20, 2009 at 1:23 PM, David A. Black wrote: > I agree, unless speed is an issue, in which case you might be better > off with: > >  str.squeeze(" \t\n\r\f") > > although it's a bit more heavy-handed and I'm probably forgetting one. Agreed, I would default to gsub here because I find \s more obvious than the character set, but if speed is an issue I'd go with sqeeze as well.