diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-04 07:19:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-04 07:20:07 +0000 |
commit | dd874ab02db04853d4b5952712ab34693f9a93de (patch) | |
tree | 4b4e05d004da14862aa1680cf761476fa2b4a05c /iredis/data/commands/substr.md | |
parent | Releasing debian version 1.12.1-1. (diff) | |
download | iredis-dd874ab02db04853d4b5952712ab34693f9a93de.tar.xz iredis-dd874ab02db04853d4b5952712ab34693f9a93de.zip |
Merging upstream version 1.13.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/substr.md')
-rw-r--r-- | iredis/data/commands/substr.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/iredis/data/commands/substr.md b/iredis/data/commands/substr.md new file mode 100644 index 0000000..7283def --- /dev/null +++ b/iredis/data/commands/substr.md @@ -0,0 +1,22 @@ +Returns the substring of the string value stored at `key`, determined by the +offsets `start` and `end` (both are inclusive). +Negative offsets can be used in order to provide an offset starting from the end +of the string. +So -1 means the last character, -2 the penultimate and so forth. + +The function handles out of range requests by limiting the resulting range to +the actual length of the string. + +@return + +@bulk-string-reply + +@examples + +```cli +SET mykey "This is a string" +GETRANGE mykey 0 3 +GETRANGE mykey -3 -1 +GETRANGE mykey 0 -1 +GETRANGE mykey 10 100 +``` |