"Harry Ohlsen" <harryo / qiqsolutions.com> wrote:

>
>   #=> ["dog", "fox", "the", "the", "lazy", "over", "brown", "jumps", "quick"]
>

It doesn't roll off the tongue like the original IMHO :)
but you may be the first person to discover programmatically
that there's a redundant word in there.

In response to this crisis, I offer:

  'Quick dogs jump over the lazy brown fox'


> Ie, we now have the values sorted first by their length,
> and when the length is the same, they're sub-sorted by the
> text itself.  I think that's great!

Agreed.  That *is/will be* bl**dy useful.

>
> I just love Ruby!
>

It's okay :)


daz
--

text = ['the quick brown fox jumped over the lazy dog',
        'the quick brown fox jumps over the lazy dog',
        'quick dogs jump over the lazy brown fox']
text.each do |phr|
  puts; p phr
  z = ('a'..'z').to_a - phr.split('')
  puts "  ... doesn't contain \"#{z}\"" unless z.empty?
end


#->"the quick brown fox jumped over the lazy dog"
#->  ... doesn't contain "s"