Why don't you write your own routine to wrap text?  Here is a simple
one.

def wrap_text(txt, col = 80)
  txt.gsub(/(.{1,#{col}})( +|$\n?)|(.{1,#{col}})/,
    "\\1\\3\n")
end

Have a look at 
http://blog.macromates.com/2006/wrapping-text-with-regular-expressions/
for explanation.

On Jun 9, 2:20 pm, Prashant Katare <[email protected]>
wrote:
> Hi all,
>         Is there any gem or plugin for "word wrapping".
>
> The reason is I'm trying to generate a pdf from my application. There
> are issues when I am trying to display long strings  with no spaces. A
> word wrapper should solve the issue I guess.
>
> Any help would be appreciated.
>
>  Thanks
> --
> Posted viahttp://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
-~----------~----~----~----~------~----~------~--~---

Reply via email to