[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: string slice elegant way

Nuralanur

3/3/2006 1:37:00 PM

You can use

a="hello there"
b=a[2..-1]
p b => "llo there"

a[2..-2]

chops off from the end.

Best regards,

Axel