Crate sds[][src]

Structs

SDS

Statics

SDS_NOINIT

Functions

alloc_ptr

Return the pointer of the actual SDS allocation (normally SDS strings are referenced by the start of the string buffer).

alloc_size

Return the total size of the allocation of the specifed sds string, including:

avail
clear

Modify an sds string in-place to make it empty (zero length). However all the existing buffer is not discarded but set as free space so that next append operations will not require allocations up to the number of bytes previously available.

cmp

Compare two sds strings s1 and s2 with memcmp().

dup

Duplicate an sds string.

empty

Create an empty (zero length) sds string. Even in this case the string always has an implicit null term.

free

Free an sds string. No operation is performed if 's' is NULL.

from_long_long
get_len
get_type
grow_zero
hdr_size
hdr_size_for
incr_len

Increment the sds length and decrements the left free space at the end of the string according to 'incr'. Also set the null term in the new end of the string.

make_room_for

Enlarge the free space at the end of the sds string so that the caller is sure that after calling this function can overwrite up to addlen bytes after the end of the string, plus one more byte for nul term.

new

Create a new sds string starting from a null terminated C string.

new_len

Create a new sds string with the content specified by the 'init' pointer and 'initlen'. If NULL is used for 'init' the string is initialized with zero bytes. If SDS_NOINIT is used, the buffer is left uninitialized;

new_raw
remove_free_space

Reallocate the sds string so that it has no free space at the end. The contained string remains not altered, but next concatenation operations will require a reallocation.

sdsnewlen
to_lower
to_upper

Type Definitions

Sds