mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
10l: fix av_str[i]start()
Originally committed as revision 9585 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
1e56c151bc
commit
059eeabf35
@ -25,7 +25,10 @@
|
|||||||
|
|
||||||
int av_strstart(const char *str, const char *pfx, const char **ptr)
|
int av_strstart(const char *str, const char *pfx, const char **ptr)
|
||||||
{
|
{
|
||||||
while (*pfx && *pfx++ == *str++);
|
while (*pfx && *pfx == *str) {
|
||||||
|
pfx++;
|
||||||
|
str++;
|
||||||
|
}
|
||||||
if (!*pfx && ptr)
|
if (!*pfx && ptr)
|
||||||
*ptr = str;
|
*ptr = str;
|
||||||
return !*pfx;
|
return !*pfx;
|
||||||
@ -33,7 +36,10 @@ int av_strstart(const char *str, const char *pfx, const char **ptr)
|
|||||||
|
|
||||||
int av_stristart(const char *str, const char *pfx, const char **ptr)
|
int av_stristart(const char *str, const char *pfx, const char **ptr)
|
||||||
{
|
{
|
||||||
while (*pfx && toupper((unsigned)*pfx++) == toupper((unsigned)*str++));
|
while (*pfx && toupper((unsigned)*pfx) == toupper((unsigned)*str)) {
|
||||||
|
pfx++;
|
||||||
|
str++;
|
||||||
|
}
|
||||||
if (!*pfx && ptr)
|
if (!*pfx && ptr)
|
||||||
*ptr = str;
|
*ptr = str;
|
||||||
return !*pfx;
|
return !*pfx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user