avutil/avstring: improve av_strreplace implement

Use AVBprint to implement av_strreplace
add av_strreplace test case TEST_STRREPLACE

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
Steven Liu
2017-04-11 10:54:35 +08:00
parent a44b3abb4c
commit 44cd7502c7
3 changed files with 28 additions and 66 deletions

View File

@@ -270,7 +270,7 @@ 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);
char *av_strireplace(const char *str, const char *from, const char *to);
/**
* Thread safe basename.