From: Ben Date: 2005-10-04T11:25:41+09:00 Subject: Wrapping strings I have a string containing multiple lines that I would like to put into a C++ file as a comment: desc = "" while (line = gets) !~ /^\.$/ desc += "#{line}" end I'd like to precede each line with a "// " to make it a comment, and I'd like to wrap each line by the 78th character. I don't suppose there is any way to do this quick and simple like? I figure I need to pull out the carriage returns, but then I can't think of anything pretty after that. Any tips? -Ben