Method: Redis#getrange

Defined in:
lib/redis.rb

#getrange(key, start, stop) ⇒ Fixnum

Get a substring of the string stored at a key.

Parameters:

  • key (String)
  • start (Fixnum)

    zero-based start offset

  • stop (Fixnum)

    zero-based end offset. Use -1 for representing the end of the string

Returns:

  • (Fixnum)

    0 or 1



845
846
847
848
849
# File 'lib/redis.rb', line 845

def getrange(key, start, stop)
  synchronize do |client|
    client.call([:getrange, key, start, stop])
  end
end