strfuncs.h revision f43734e772a94c8d2b684b59c212fecf66122d15
#ifndef STRFUNC_H
#define STRFUNC_H
extern const unsigned char uchar_nul; /* (const unsigned char *)"" */
/* 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. */
/* Optimized version of t_strsplit(data, "\t") */
/* 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. */
/* FIXME: v2.3 - sort and search APIs belong into their own header, not here */
#include "sort.h"
(int (*)(const void *, const void *))cmp)
/* INTERNAL */
unsigned int *size_r)
#endif