From dd874ab02db04853d4b5952712ab34693f9a93de Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 4 Jan 2023 08:19:36 +0100 Subject: Merging upstream version 1.13.0. Signed-off-by: Daniel Baumann --- iredis/data/commands/substr.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 iredis/data/commands/substr.md (limited to 'iredis/data/commands/substr.md') 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 +``` -- cgit v1.2.3