Robert Klemme
6/18/2007 6:46:00 AM
On 18.06.2007 03:10, Dan German wrote:
> unknown wrote:
>> Hi --
>>
>> On Mon, 18 Jun 2007, Dan German wrote:
>>
>>> ... I know the substring, its location, and length
>> You can use slice!.
>>
>> string = "This is a string"
>> string.slice!(4,5)
>> puts string # => This string
>>
>>
>> David
>
> thanks, that works
Alternative:
irb(main):001:0> string = "This is a string"
=> "This is a string"
irb(main):002:0> string[4,5]=''
=> ""
irb(main):003:0> string
=> "This string"
Kind regards
robert