aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/avstring.h
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-03-06 19:41:22 +0000
committerMåns Rullgård <mans@mansr.com>2010-03-06 19:41:22 +0000
commitac6ef8682d1fe8afa9f0a3fcc9eadbad1c903937 (patch)
treedae93a928ac20857d2cf4f4dfdfbb77c2b41ce85 /libavutil/avstring.h
parenta0ac950109201b3e836d85cb4c110d3fbd549343 (diff)
downloadffmpeg-ac6ef8682d1fe8afa9f0a3fcc9eadbad1c903937.tar.gz
Add av_stristr() function
This is a case-insensitive version of strstr(). Originally committed as revision 22251 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/avstring.h')
-rw-r--r--libavutil/avstring.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavutil/avstring.h b/libavutil/avstring.h
index 4e3f5df169..d9f6a0fa01 100644
--- a/libavutil/avstring.h
+++ b/libavutil/avstring.h
@@ -47,6 +47,19 @@ int av_strstart(const char *str, const char *pfx, const char **ptr);
int av_stristart(const char *str, const char *pfx, const char **ptr);
/**
+ * Locate the first case-independent occurrence in the string s1 of
+ * the string s2. A zero-length string s2 is considered to match at
+ * the start of s1.
+ *
+ * This function is a case-insensitive version of the standard strstr().
+ *
+ * @param s1 string to search in
+ * @param s2 string to search for
+ * @return pointer to the located match within s1 or a null pointer if no match
+ */
+char *av_stristr(const char *s1, const char *s2);
+
+/**
* Copy the string src to dst, but no more than size - 1 bytes, and
* null-terminate dst.
*