From: "Jon A. Lambert" Date: 2003-11-17T11:40:13+09:00 Subject: Re: substring: to the end of the string "KONTRA Gergely" wrote in message news:20031114154849.GA12384@mlabdial.hit.bme.hu... > Hi! > > Is there any easiest way to get the substring starting from the 3rd > character? > > my solution: > str[3..-1] which seems quite odd :-/ > > What if, intuitive, we can write > str[3..]? > > Any smarter solution? > Actually I find this behavior annoying: irb(main):015:0> "hello"[3..-1] => "lo" irb(main):016:0> "hello"[4..-1] => "o" irb(main):017:0> "hello"[5..-1] => "" irb(main):018:0> "hello"[6..-1] => nil -- J. Lambert