strfuncs.h revision 5f30a00d160c75271d7b80d87a341963d8a9f6e2
#ifndef __STRFUNC_H
#define __STRFUNC_H
#define is_empty_str(str) \
/* Returns -1 if dest wasn't large enough, 0 if not. */
/* same with temporary memory allocations: */
char *t_strdup_noconst(const char *str);
/* Like t_strdup(), but stop at cutchar. */
/* Return TRUE if all characters in string are numbers.
Stop when `end_char' is found from string. */
/* Like strlcpy(), but return -1 if buffer was overflown, 0 if not. */
/* Print given directory and file to dest buffer, separated with '/'.
If destination buffer is too small, it's set to empty string and errno is
set to ENAMETOOLONG. Retuns -1 if buffer is too small, or 0 if not. */
const char *file_prefix, const char *file);
const char *t_str_lcase(const char *str);
const char *t_str_ucase(const char *str);
/* seprators is an array of separator characters, not a separator string. */
/* like t_strsplit(), but treats multiple spaces as a single separator. */
/* Return length of NULL-terminated list string array */
unsigned int strarray_length(const char *const *arr);
/* Return all strings from array joined into one string. */
/* INTERNAL */
#endif