From: "Firestone, Mark - Technical Support" Date: 2002-04-16T01:26:05+09:00 Subject: RE: Pascal to Ruby Well, ya... I have a bunch of text, in (in pascal terms) an array of string. I want to be able to insert somewhere so... array[1] = "line1" array[2] = "line2" array[3] = "line3" insert "new line2" at 2 array[1] = "line1" array[2] = "new line2" array[3] = "line2" array[4] = "line3" etc... thanks, Mark -----Original Message----- From: ts [mailto:decoux@moulon.inra.fr] Sent: 15 April 2002 17:21 To: ruby-talk@ruby-lang.org Cc: ruby-talk@ruby-lang.org Subject: Re: Pascal to Ruby >>>>> "F" == "Firestone, Mark <- Technical Support" > writes: F> Basically, I have an array of text in a buffer, and I need to be able to F> insert at whatever point and move everyting UP .... with all the other cool F> string stuff in ruby, I can't believe I will have to write that out. F> Ideas? Well, I've not understood you don't want a String method but an Array method no ? pigeon% ruby -e 'a = ["a", "c"]; a[1,0] = "b"; p a; a[1][0,0] = "123"; p a' ["a", "b", "c"] ["a", "123b", "c"] pigeon% Guy Decoux NOTICE: This e-mail and any attachment(s) may contain confidential and proprietary information of Goss International Corporation and/or its subsidiaries and may be legally privileged. This e-mail is intended solely for the addressee. If you are not the addressee, dissemination, copying or other use of this e-mail or any of its content is strictly prohibited and may be unlawful. If you are not the intended recipient please inform the sender immediately and destroy the e-mail and any copies. All liability for viruses is excluded to the fullest extent permitted by law. Any views expressed in this message are those of the individual sender. No contract may be construed by this e-mail.