[misc] Add an in-place string replacement function

This commit is contained in:
ejurgensen
2020-02-11 14:12:04 +01:00
parent d90cf953dc
commit d86ca1176d
2 changed files with 46 additions and 3 deletions

View File

@@ -87,6 +87,8 @@ safe_asprintf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
int
safe_snprintf_cat(char *dst, size_t n, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
int
safe_snreplace(char *s, size_t sz, const char *pattern, const char *replacement);
/* Key/value functions */
struct keyval *