feat(lsm): added trie search

This commit is contained in:
Jef Roosens 2023-10-13 22:08:06 +02:00
parent 622d644f25
commit 87000e8f73
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
5 changed files with 124 additions and 6 deletions

View file

@ -34,6 +34,15 @@ void lsm_str_init_prealloc(lsm_str *str, char *s);
*/
lsm_error lsm_str_init(lsm_str **ptr, char *s);
/**
* Same as lsm_str_init, except it copies the original string instead of taking
* over ownership, leaving the original string untouched.
*
* @param ptr pointer to store newly allocated pointer
* @param s string to copy into lsm string
*/
lsm_error lsm_str_init_copy(lsm_str **ptr, char *s);
/**
* Deallocate the existing internal string if needed and replace the lsm_str
* with a string of length 0, wiping its contents.