From: bill gate Date: 2012-06-07T18:42:30+09:00 Subject: Re: string character count Jan E. wrote in post #1063505: > s.split.map(&:length).join ' ' > > Or even shorter and more robust (will handle any sequence of any space > characters): > > s.gsub /\S+/, &:length > > However, this is also slower. 回答的真是精彩! -- Posted via http://www.ruby-forum.com/.