Prev: Redhat is using ruby and rails in deltacloud effort
Next: IPAddress: new IP manipulation library
From: Darryl Brown on 23 May 2010 19:29 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 23 May 2010 20:29 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 23 May 2010 21:30 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
|
Pages: 1 Prev: Redhat is using ruby and rails in deltacloud effort Next: IPAddress: new IP manipulation library |