From: Darryl Brown on
Hello All,

It is possible to increment a string as follows:

irb(main):001:0> x = 'a'
=> "a"
irb(main):002:0> x.succ
=> "b"
irb(main):003:0> x.next
=> "b"

Is there a method to decrement a string?

Thanks,
Darryl
From: Yukihiro Matsumoto on
Hi,

In message "Re: string decrement"
on Mon, 24 May 2010 08:30:06 +0900, Darryl Brown <d-l-brown(a)roadrunner.com> writes:

|Is there a method to decrement a string?

Defining decrement behavior for strings is much more difficult than
you might expect. Can you define exact behavior?

matz.

From: Darryl Brown on
On May 23, 8:29 pm, Yukihiro Matsumoto <m...(a)ruby-lang.org> wrote:
> Hi,
>
> In message "Re: string decrement"
>     on Mon, 24 May 2010 08:30:06 +0900, Darryl Brown <d-l-br...(a)roadrunner.com> writes:
>
> |Is there a method to decrement a string?
>
> Defining decrement behavior for strings is much more difficult than
> you might expect.  Can you define exact behavior?
>
>                                                         matz.

Hello Matz,

This is quite an honor.

I was facing a minor problem using ruby for some data
collection by writing results to excel. I have since
solved this by offsetting my start column by one cell.

This eliminates my original need to decrement the column.

Have also learned that excel cells can be expressed numerically
as well.


Thanks,
Darryl