mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-21 23:05:49 +00:00
Add SDL_strpbrk
This commit is contained in:
committed by
Anonymous Maarten
parent
55934bc85e
commit
baa1a5e2f4
@@ -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
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
#cmakedefine HAVE_STRNLEN 1
|
||||
#cmakedefine HAVE_STRLCPY 1
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
#cmakedefine HAVE_STRPBRK 1
|
||||
#cmakedefine HAVE__STRREV 1
|
||||
#cmakedefine HAVE__STRUPR 1
|
||||
#cmakedefine HAVE__STRLWR 1
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRPBRK 1
|
||||
#define HAVE_STRCASESTR 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRPBRK 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
@@ -160,6 +160,7 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRPBRK 1
|
||||
#define HAVE__WCSDUP 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_VSSCANF 1
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRPBRK 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRPBRK 1
|
||||
#define HAVE__STRREV 1
|
||||
/* These functions have security warnings, so we won't use them */
|
||||
/* #undef HAVE__STRUPR */
|
||||
|
||||
Reference in New Issue
Block a user