From: "Zachary P. Landau" Date: 2004-02-15T16:58:06+09:00 Subject: Re: method to WRAP text at _ # of characters? --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 15, 2004 at 04:11:36PM +0900, Ruby Baby wrote: > Made myself a li'l Ruby class for sending email. >=20 > But of course I'd like to wrap the outgoing body of text at > 68 characters or so, before sending. >=20 > Having taken PHP's "wordwrap" function for granted, > (), I was surprised not to find > a similar method built-in to Ruby. >=20 > Or is it? > Did I miss it? > Am I going to have to write my own? Try searching for "gsub \1 \n" in the comp.lang.ruby search bar at http://www.rubyforge.org. The first result is a discussion about a wrap method. -- Zachary P. Landau GPG: gpg --recv-key 0x24E5AD99 | http://kapheine.hypa.net/kapheine.asc --ibTvN161/egqYuK8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFALyYDCwWyMCTlrZkRAtzuAKCEgUqc/EYwAul8+3Gl1Ed8D77PtACeMHyZ 25xWJiTSn+qsNmHakw8+7CU= =Uf8A -----END PGP SIGNATURE----- --ibTvN161/egqYuK8--