Collection of C utils based on the excellent Redis SDSlib string library

This is intended to be used in standalone C programs and has no dependencies
other than libc. This is mostly for the benefit of people who dislike dynamic
library depenencies.

The library supports the normal SDSlib functions and also adds a number of
utility functions based around these including basic file reading, regex
searching (using SLRE), compression (using LZF), encryption (using Blowfish),
and functional list-processing utilities (map/reduce/apply)

There isn't (currently( and documentation other tha the sdsutil.c source code
and the example programs (readfile.c provides a fairly useful example of use of
the library)

NOTE: The library is based on a fairly old version of the zmalloc/sds/list code
from Redis. At some point syncing with head would be a good thing.

License: BSD

The additional functions provided are (from sdsutil.h): 

int sdscount(sds s,char c);
int sdsstartswith(sds s,sds prefix);
int64_t sdsgetint(sds s,int len);
sds sdscatint(sds s,int64_t num,int len);
sds sdsread(FILE *fp,size_t nbyte);
sds sdsreadfile(FILE *fp);
sds sdsreaddelim(FILE *fp,void *delim,int len);
sds sdsreadline(FILE *fp,const char *prompt);
list *sdsmatchre(sds s,struct slre *slre,int ncap);
list *sdsmatch(sds s,char *re);
sds sdssha256(sds s);
sds sdscompress(sds s);
sds sdsdecompress(sds s);
sds sdsencrypt(sds s,sds key,sds iv);
sds sdsdecrypt(sds z,sds key);
sds sdshex(sds s);
sds sdsunhex(sds s);
sds sdsrepr(sds s);
sds sdsunrepr(sds s);
void sdsprintrepr(FILE *fp,char *prefix,sds s,char *suffix);
void sdsprinthex(FILE *fp,char *prefix,sds s,char *suffix);
sds sdsexec(char *cmd);
sds sdspipe(char *cmd,sds input);
list *sdssplit(sds s,sds delim);
sds listJoin(list *l,sds delim);
list *listMap(list *l,void *(*f)(void *data),void (*free)(void *ptr),void *(*dup)(void *));
void listApply(list *l,void *(*f)(void *data));
void listReduce(list *l,void *init,void (*f)(void *acc,void *val));
list *listRange(list *l,int start,int end);
list *listRangeDup(list *l,int start,int end);
list *listFilter(list *l,int (*f)(void *data));
list *listFilterDup(list *l,int (*f)(void *data));
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.