Mercurial > libavutil.hg
diff avstring.h @ 860:536c2e94defa libavutil
Add av_stristr() function
This is a case-insensitive version of strstr().
author | mru |
---|---|
date | Sat, 06 Mar 2010 19:41:22 +0000 |
parents | 5dc6729a3b4e |
children | c66e06fb1b36 |
line wrap: on
line diff
--- a/avstring.h Sat Mar 06 14:24:59 2010 +0000 +++ b/avstring.h Sat Mar 06 19:41:22 2010 +0000 @@ -47,6 +47,19 @@ 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. *