From 99e5d81ef997cb88b1a40e6f253f37f7cbf251d9 Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Sat, 1 Apr 2017 10:55:04 +0800 Subject: 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 --- libavutil/avstring.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavutil/avstring.h') diff --git a/libavutil/avstring.h b/libavutil/avstring.h index dd2876990f..33be8bf484 100644 --- a/libavutil/avstring.h +++ b/libavutil/avstring.h @@ -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. -- cgit v1.2.3