Method: Redis#setrange

Defined in:
lib/redis.rb

#setrange(key, offset, value) ⇒ Fixnum

Overwrite part of a string at key starting at the specified offset.

Parameters:

  • key (String)
  • offset (Fixnum)

    byte offset

  • value (String)

Returns:

  • (Fixnum)

    length of the string after it was modified



832
833
834
835
836
# File 'lib/redis.rb', line 832

def setrange(key, offset, value)
  synchronize do |client|
    client.call([:setrange, key, offset, value.to_s])
  end
end