avutil/avstring: add av_strreplace API into avstring

refer to: http://creativeandcritical.net/str-replace-c
add av_strreplace API for replace string operations.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
Steven Liu
2017-04-01 10:55:04 +08:00
parent 6171f178e7
commit 99e5d81ef9
2 changed files with 82 additions and 0 deletions
+5
View File
@@ -266,6 +266,11 @@ int av_strcasecmp(const char *a, const char *b);
*/
int av_strncasecmp(const char *a, const char *b, size_t n);
/**
* Locale-independent strings replace.
* @note This means only ASCII-range characters are replace
*/
char *av_strreplace(const char *str, const char *from, const char *to);
/**
* Thread safe basename.