Hello all,
I am reading the book Ruby on Rails Tutorial : Learning by Example
At the end of chapter 4 theres a question. I tried many time but nit
succeeding in solving it.
Can you all please help me in writing a solution for the same?
Question is :
Using Listing 4.9 as a guide, combine the split, shuffle, and join
methods to write a function that shuffles the letters in a given
string.
Listing 4.9. Skeleton for a string shuffle function :
>> def string_shuffle(s)
>> s.split('').?.?
>> end
=> nil
>> string_shuffle("foobar")
Thank you
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.