The APIs provided by Redis

Source: Internet
Author: User
Tags redis

(i) string SDS

1) Sdsnew: Create a SDS containing the given C string

2) Sdsempty: Create an empty SDS that does not contain any content

3) Sdsfree: Release of the given SDS

4) Sdslen: Number of bytes of used space returned to SDS

5) Sdsavail: The number of unused space bytes returned by SDS

6) Sdsdup: Create a copy of a given SDS (copy)

7) Sdsclear: Empty the contents of SDS-Saved strings

8) Sdscat: Stitching the given C string to the end of the SDS string

9) Sdscatsds: Stitching the given SDS string to the end of another SDS string

sdscpy: Copy the given C string into the SDS, overwriting the original SDS string

Sdsgrowzero: Extend SDS to a given length with null characters

Sdsrange: Preserves data within a given interval of SDS, and data that is not within the interval is overwritten or cleared

Sdstrim: Receives an SDS and a C string as a parameter, removing all occurrences of the characters in the C string from the left and right sides of the SDS, respectively

SDSCMP: Comparison of two SDS strings


(ii) linked list

1) Listsetdupmethod: Sets the given function to the node value copy function of the linked list

2) Listgetdupmethod: Returns the node value copy function that is currently in use by the list

3) Listsetfreemethod: Sets the given function to the node value deallocation function of the linked list

4) Listgetfree: Returns the node value release function that is currently in use by the list

5) Listsetmatchmethod: Sets the given function to the node value comparison function of the linked list

6) Listgetmatchmethod: Returns the node value comparison function that is currently in use by the list

7) Listlength: Returns the length of the linked list (contains the number of nodes)

8) Listfirst: Returns the table header node of the linked list

9) Listlast: Returns the footer node of the linked list

Listprevnode: Returns the predecessor node of a given node

Listnextnode: Returns the backend node for a given node

Listnodevalue: Returns the value currently being saved for the given node

Listcreate: Create a new linked list that does not contain any nodes

Listaddnodehead: Adds a new node with the given value to the table header for the given list

Listaddnodetail: Adds a new node with a given value to the footer of a given list

Listinsertnode: Adds a new node with the given value before or after the given node

Listsearchkey: Query and return the node containing the given value in the linked list

ListIndex: Returns the node of the linked list on the given index

Listdelnode: Remove the given node from the list

Listrotate: POPs the footer node of the list, and then inserts the node that is popped into the table header of the linked list, becoming the new header node

Listdup: Copy a copy of a given list

Listrelease: Releases the given list, and all nodes in the linked list




To be continued ....... .......


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.