strfuncs.h revision 833fd67ffe6a1832d72b3d310e07345a42a7b6ab
#ifndef STRFUNC_H
#define STRFUNC_H
extern const unsigned char uchar_nul; /* (const unsigned char *)"" */
extern const unsigned char *uchar_empty_ptr; /* non-NULL pointer that shouldn't be dereferenced. */
/* 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. */
/* Replace all from->to chars in the string. */
/* Like strlcpy(), but return -1 if buffer was overflown, 0 if not. */
const char *t_str_lcase(const char *str);
const char *t_str_ucase(const char *str);
/* Trim matching chars from either side of the string */
{
}
/* separators is an array of separator characters, not a separator string.
an empty data string results in an array containing only NULL. */
/* like p_strsplit(), but treats multiple adjacent separators as a single
separator. separators at the beginning or at the end of the string are also
ignored, so it's not possible for the result to have any empty strings. */
/* Return length of NULL-terminated list string array */
/* Return all strings from array joined into one string. */
/* Removes a value from NULL-terminated string array. Returns TRUE if found. */
/* Returns TRUE if value exists in NULL-terminated string array. */
/* Like str_array_find(), but use strcasecmp(). */
/* Duplicate array of strings. The memory can be freed by freeing the
return value. */
/* Join ARRAY_TYPE(const_string) to a string, similar to t_strarray_join() */
const char *separator);
/* INTERNAL */
unsigned int *size_r)
#endif