From: Neko Date: 2008-12-03T10:34:24+09:00 Subject: Re: Substring with "..." Jim Menard wrote: > Is this a school assignment? What have you tried so far? Well, since I'm a Ruby newbie, here's my take (even if the thread author was looking for a Rails solution): phrase = gets.chomp length = phrase.length if length >= 20 puts phrase.slice(0..20) + "..." else puts phrase end What do you think? Best regards, -N.