Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add STRPOP (#12) #13

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

neomantra
Copy link
Contributor

I made this relative to my CHOP work. If you prefer it to be based on current master, let me know.

CHOP key count

Removes characters from a value to a String key.
If 'count' is positive or zero, it removes from the right of the string;
if 'count' is negative, it removes from the left of the string.
If |count| is greater than the string length, the value is set as an empty string.
It is an error if the value is not a String.
Integer Reply: the length of the string after the chop operation.
Since Redis 4 was released without redis/redis#3718
this change was required to make CHOP work properly with Redis 4.0.0.

Now all tests pass on stock Redis 4.0.0.
Includes test and documentation.
@itamarhaber
Copy link
Contributor

So this relates to #10 - thanks for the contrib, will try to merge asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants