From: daz Date: 2005-07-09T12:25:50+09:00 Subject: Re: truncate a string to first 200 characters luke wrote: > > hi, > > i've been searching high and low for a method that will help me do this for > a couple of days, but decided eventually just to post here in the hope > someone can point out the probably blatantly obvious for me :) > > i'm looking for something that can take a string and truncate it to a > certain amount of characters. then i can add '...' at the end. > s = 'abcdefghijklmnopqrstuvwxyz' puts s[0, 6] << '...' #-> abcdef... daz