From: Ryan Date: 2001-10-27T04:54:05+09:00 Subject: [ruby-talk:23509] Re: Get last character in string? there's always the extremely ugly: $_="1234" puts ~/($)/ :) ----- Original Message ----- From: "Morris, Chris" To: "ruby-talk ML" Sent: Friday, October 26, 2001 3:42 PM Subject: [ruby-talk:23500] Get last character in string? > Is there a more concise way to do this? > > irb(main):005:0> s = "abcd" > "abcd" > irb(main):006:0> s[s.length - 1, 1] > "d" > > Chris Morris > chris.morris@snelling.com > >