Subject: Re: accessing each character of a string
From: Gavin Kistner <gavin refinery.com>
Date: Thu, 19 May 2005 11:54:25 +0900
References: 143112
In-reply-to: 143112
On May 18, 2005, at 5:40 PM, Boris Glawe wrote:
> my problem is obviously very basic, but how to I acces for example
> the third character of the string "hello" ??
puts "hello"[2] #=> 108
puts "hello"[2..2] #=> "l"