Subject: Quick and dirty word wrapping.
From: Erik Terpstra <erik terpnet.nl>
Date: Wed, 14 Sep 2005 23:26:36 +0900
In case anyone needs it,
str = 'This is a test of the emergency broadcasting services'
str.scan(/(.{1,30})(?:\s+|$)/)
=> [["This is a test of the"], ["emergency broadcasting"], ["services"]]