Add SDL_strpbrk

This commit is contained in:
Anonymous Maarten
2024-09-02 14:13:54 +02:00
committed by Anonymous Maarten
parent 55934bc85e
commit baa1a5e2f4
15 changed files with 96 additions and 4 deletions

View File

@@ -2401,3 +2401,22 @@ int SDL_vasprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, va_list
}
}
}
char * SDL_strpbrk(const char *str, const char *breakset)
{
#ifdef HAVE_STRPBRK
return strpbrk(str, breakset);
#else
for (; *str; str++) {
const char *b;
for (b = breakset; *b; b++) {
if (*str == *b) {
return (char *) str;
}
}
}
return NULL;
#endif
}