GETRANGE key start end
Time complexity: 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.
Warning: this command was renamed to GETRANGE, it is called in Redis versions .
The function handles out of range requests by limiting the resulting range to the actual length of the string.
*Examples
redis> GETRANGE mykey 0 3
redis> GETRANGE mykey -3 -1
redis> GETRANGE mykey 10 100