20 #ifndef __TOOLS_STRING_H 21 #define __TOOLS_STRING_H 38 char *
str_cat(
char **dest,
const char *src);
50 char *
str_ncat(
char **dest,
const char *src,
size_t n);
60 char *
str_replace(
const char *search,
const char *replace,
const char *subject);
69 size_t strlcpy(
char *dst,
const char *src,
size_t size);
78 size_t strlcat(
char *dst,
const char *src,
size_t size);
char * str_cat(char **dest, const char *src)
Concatenate dynamically allocated string with constant string.
char * str_replace(const char *search, const char *replace, const char *subject)
Replace all occurrences of the search string with the replacement string.
size_t strlcat(char *dst, const char *src, size_t size)
Size-bounded string concatenation.
char * str_ncat(char **dest, const char *src, size_t n)
Similar to str_cat() except it will use at most n bytes from src.
size_t strlcpy(char *dst, const char *src, size_t size)
Size-bounded string copying.