From: Stephen White Date: 2001-01-02T16:08:39+09:00 Subject: [ruby-talk:8500] Re: Fetching a single character of a string On Tue, 2 Jan 2001, Michael Granger wrote: > Because String[ Integer ] returns a Fixnum, I am currently extracting > single character strings from a string by doing: > > aString.split('')[ anInteger ] > > Is there a better way to get a single character of a string as a string > instead of a Fixnum? Or a way to convert a Fixnum to its character > string equivalent? irb(main):001:0> a = "hello" "hello" irb(main):002:0> a[3,1] "l" -- steve@deaf.org