[FFmpeg-devel] [PATCH] Add av_stristr() function

Michael Niedermayer michaelni
Mon Mar 8 23:16:21 CET 2010


On Mon, Mar 08, 2010 at 10:10:07PM +0000, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Sat, Mar 06, 2010 at 01:29:57PM +0000, Mans Rullgard wrote:
> >> This is a case-insensitive version of strstr().
> > [...]
> >>  
> >>  /**
> >> + * 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
> >> + */
> >
> > id replace s1/s2 with needle and haystack 
> 
> I used the same names as the standard definition of strstr(), but I
> can of course change them.

i would prefer some "colorfull" names over s1 and s2, well basically i gues
i would be happy with any names that are semantically correct but would be
semantically wrong if exchanged. s1,s2 as well as s2,s1 both are equally
correct, thats bad because the variable then say nothing about them at all


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100308/ea832647/attachment.pgp>



More information about the ffmpeg-devel mailing list