some handy functions i think i might need in the future.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


here are some functions i think i might need in the future.
hope you find them useful, too.

functions #0:
char *strjoin(char *buf, char *delim, "string1", "string2", "string3", ..., NULL)

join the strings with delimeter string 'delim' , the last string MUST BE 'NULL'
return buf.
this function has no SAFETY check, buf must be BIG ENOUGH.

functions #1:
char *strbetween(char *buf, char *string, char *start, char *end);

this function returns the first substring between 'start' and 'end',
and store it in buf.
buf must be big enought,
if nothing found, returns NULL

functions #2:
char *sstrrep(char *str, const char *old, const char *new, int times)

replace the substring 'old' with 'new' for 'times' times;
if times == 0, then replace all 'old' with 'new'
return str on success, NULL on error.
NOTE: if can not find 'times' 'old', return NULL as well.