Method: Protocol::Redis::Methods::Strings#getrange

Defined in:
lib/protocol/redis/methods/strings.rb

#getrange(key, start_index, end_index) ⇒ Object

Get a substring of the string stored at a key. O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings. See <redis.io/commands/getrange> for more details.



61
62
63
# File 'lib/protocol/redis/methods/strings.rb', line 61

def getrange(key, start_index, end_index)
	call("GETRANGE", key, start_index, end_index)
end