strfuncs.h revision 402f9183489c1a75736b1e9068c33fe2741a366d
#ifndef __STRFUNC_H
#define __STRFUNC_H
#define is_empty_str(str) \
/* Returns -1 if dest wasn't large enough, 0 if not. */
/* return NULL if str = "" */
/* *end isn't included */
/* same with temporary memory allocations: */
/* return NULL if str = "" */
/* *end isn't included */
const char *t_strdup_printf(const char *format, ...)
const char *t_strconcat(const char *str1, ...)
/* 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);
/* separators is an array of separator characters, not a separator string. */
/* like p_strsplit(), but treats multiple adjacent separators 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. */
/* Removes a value from NULL-terminated string array. Returns TRUE if found. */
/* INTERNAL */
#endif