On 27/05/2009, at 8:31 PM, Ruby One wrote:
> > have this function with whe work cuts the word inbetween which i > don't want want please help. > Sorry to be a pain. Could you please send your email again. Please use better English. Use simpler sentences, if you need to. I don't understand the problem. Julian. ---------------------------------------------- Learn: http://sensei.zenunit.com/ Last updated 20-May-09 (Rails, Basic Unix) Blog: http://random8.zenunit.com/ Twitter: http://twitter.com/random8r > words = "Kid games need to be both fun and educational. Aimed at ages > pre-K through middle school, safe environment to discover their > abilities and learn new skills with interactive and fun computer > games. Our games build skills in math, logic, memory, vocabulary, > alphabet, spelling, geography, computer skills, color identification, > shape identification and other various problem solving. Our commitment > to parents, teachers, and kids, is to connect earning and skill > building with a sense of challenge, fun, and self esteem." > > line_length = 40 > > word_arry = words.split(" ") > > text = (0..(words.length / line_length)).inject([]) {|v,num| start = > num * line_length; v << %Q{<= #{words[(start)...(start + > line_length)]} =>}} > text.join("\n") > > @counter="" > text.each do |ts| > > @counter += ts + "</br>" > > end > > > thanks > -- > Posted via http://www.ruby-forum.com/. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

