Subject: Getting last character from a string
From: draco draco <thedraco go2.pl>
Date: Sun, 12 Feb 2006 09:07:41 +0900
Hello
I'm new to Ruby. I've a simple question.
Is there a more readable way to get last character from string than this
one? :
x = "text"
last_char = x[x.length-1, x.length-1]
--
Posted via http://www.ruby-forum.com/.