Dave Thomas wrote:
> irb(main):006:0> a = "dave"
>=> "dave"
> irb(main):007:0> a["av"] = "onat"
>=> "onat"
> irb(main):008:0> a
>=> "donate"

Thanks, now I'm using the following methods:

class String

  def simple_sub!(find, replace)
    self[find] = replace
    return true
  rescue
    return false
  end

  def simple_gsub!(find, replace)
    c = 0
    while self.simple_sub!(find, replace)
      c += 1
    end
    return c
  end

end

end

-- 
AVR-Tutorial, er 350 Links
Forum f AVRGCC und MSPGCC
-> http://www.mikrocontroller.net