Description Usage Arguments Details Value Author(s) References See Also Examples
Trim an existing list so that it will contain only the specified range of elements specified.
1 | redisLTrim(key, start, end)
|
key |
A key corresponding to a Redis list object. |
start |
The starting list index at which to trim. |
end |
The ending list index at which to trim. |
Start and end are zero-based indexes. 0 is the first element of the list (the list head), 1 the next element and so on.
TRUE if successful. An error is thrown if the key does not exist or correspond to a list value.
B. W. Lewis
http://redis.io/commands
1 2 3 4 5 6 7 8 9 | ## Not run:
redisConnect()
redisLPush('x',1)
redisLPush('x',2)
redisLPush('x',3)
redisLTrim('x',0,1)
redisLRange('x',0,99)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.