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
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
Hi,
In message “Re: string decrement”
on Mon, 24 May 2010 08:30:06 +0900, Darryl Brown
[email protected] 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.
On May 23, 8:29 pm, Yukihiro M. [email protected] wrote:
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs