From: k Date: 2002-06-10T09:19:00+09:00 Subject: Re: String.left? "1234567890".slice(0,4) or "1234567890"[0...4] or "1234567890"[0,4] or see http://www.rubycentral.com/book/ref_c_string.html "Philip Mak" wrote in message news:20020609234140.GI9947@trapezoid.interserver.net... > Is there a function that acts like String.left? I'd like to be able to > get the leftmost x characters of the string. e.g.: > > "1234567890".left(4) => "1234" > "x".left(4) => "x" >