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

@@ -1297,6 +1297,22 @@ extern SDL_DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str
*/
extern SDL_DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen);
/**
* Searches a string for the first occurence of any character contained in a
* breakset, and returns a pointer from the string to that character.
*
* \param str The null-terminated string to be searched.
* \param breakset A null-terminated string containing the list of characters
* to look for.
* \returns A pointer to the location, in str, of the first occurence of a
* character present in the breakset, or NULL if none is found.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC char * SDLCALL SDL_strpbrk(const char * SDL_RESTRICT str, const char * SDL_RESTRICT breakset);
/**
* The Unicode REPLACEMENT CHARACTER codepoint.
*
@@ -3079,6 +3095,7 @@ size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size);
#define SDL_wcsncmp wcsncmp
#define SDL_strcasecmp strcasecmp
#define SDL_strncasecmp strncasecmp
#define SDL_strpbrk strpbrk
#define SDL_sscanf sscanf
#define SDL_vsscanf vsscanf
#define SDL_snprintf snprintf