strfuncs.h revision 33ca6b017b6ebbd048651b5e3d16915001dbc291
#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);
const int *t_intarrdup(const int *arr);
/* 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);
void str_remove_escapes(char *str);
/* returns number of items in array */
int strarray_length(char *const array[]);
/* return index of item in array, or -1 if not found */
/* seprators is an array of separator characters, not a separator string. */
/* INTERNAL */
#endif