SDL
2.0
|
Go to the source code of this file.
Data Structures | |
struct | SDL_FormatInfo |
Macros | |
#define | SDL_isupperhex(X) (((X) >= 'A') && ((X) <= 'F')) |
#define | SDL_islowerhex(X) (((X) >= 'a') && ((X) <= 'f')) |
#define | UTF8_IsLeadByte(c) ((c) >= 0xC0 && (c) <= 0xF4) |
#define | UTF8_IsTrailingByte(c) ((c) >= 0x80 && (c) <= 0xBF) |
Enumerations | |
enum | SDL_letter_case { SDL_CASE_NOCHANGE, SDL_CASE_LOWER, SDL_CASE_UPPER } |
Functions | |
static int | UTF8_TrailingBytes (unsigned char c) |
static size_t | SDL_ScanLong (const char *text, int radix, long *valuep) |
static size_t | SDL_ScanUnsignedLong (const char *text, int radix, unsigned long *valuep) |
static size_t | SDL_ScanUintPtrT (const char *text, int radix, uintptr_t *valuep) |
static size_t | SDL_ScanLongLong (const char *text, int radix, Sint64 *valuep) |
static size_t | SDL_ScanUnsignedLongLong (const char *text, int radix, Uint64 *valuep) |
static size_t | SDL_ScanFloat (const char *text, double *valuep) |
void * | SDL_memset (SDL_OUT_BYTECAP(len) void *dst, int c, size_t len) |
void * | SDL_memcpy (SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len) |
void * | SDL_memmove (SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len) |
int | SDL_memcmp (const void *s1, const void *s2, size_t len) |
size_t | SDL_strlen (const char *string) |
size_t | SDL_wcslen (const wchar_t *string) |
size_t | SDL_wcslcpy (SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen) |
size_t | SDL_wcslcat (SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen) |
int | SDL_wcscmp (const wchar_t *str1, const wchar_t *str2) |
size_t | SDL_strlcpy (SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen) |
size_t | SDL_utf8strlcpy (SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes) |
size_t | SDL_utf8strlen (const char *str) |
size_t | SDL_strlcat (SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen) |
char * | SDL_strdup (const char *string) |
char * | SDL_strrev (char *string) |
char * | SDL_strupr (char *string) |
char * | SDL_strlwr (char *string) |
char * | SDL_strchr (const char *string, int c) |
char * | SDL_strrchr (const char *string, int c) |
char * | SDL_strstr (const char *haystack, const char *needle) |
char * | SDL_itoa (int value, char *string, int radix) |
char * | SDL_uitoa (unsigned int value, char *string, int radix) |
char * | SDL_ltoa (long value, char *string, int radix) |
char * | SDL_ultoa (unsigned long value, char *string, int radix) |
char * | SDL_lltoa (Sint64 value, char *string, int radix) |
char * | SDL_ulltoa (Uint64 value, char *string, int radix) |
int | SDL_atoi (const char *string) |
double | SDL_atof (const char *string) |
long | SDL_strtol (const char *string, char **endp, int base) |
unsigned long | SDL_strtoul (const char *string, char **endp, int base) |
Sint64 | SDL_strtoll (const char *string, char **endp, int base) |
Uint64 | SDL_strtoull (const char *string, char **endp, int base) |
double | SDL_strtod (const char *string, char **endp) |
int | SDL_strcmp (const char *str1, const char *str2) |
int | SDL_strncmp (const char *str1, const char *str2, size_t maxlen) |
int | SDL_strcasecmp (const char *str1, const char *str2) |
int | SDL_strncasecmp (const char *str1, const char *str2, size_t maxlen) |
int | SDL_sscanf (const char *text, SDL_SCANF_FORMAT_STRING const char *fmt,...) |
int | SDL_vsscanf (const char *text, const char *fmt, va_list ap) |
int | SDL_snprintf (SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt,...) |
static size_t | SDL_PrintString (char *text, size_t maxlen, SDL_FormatInfo *info, const char *string) |
static size_t | SDL_PrintLong (char *text, size_t maxlen, SDL_FormatInfo *info, long value) |
static size_t | SDL_PrintUnsignedLong (char *text, size_t maxlen, SDL_FormatInfo *info, unsigned long value) |
static size_t | SDL_PrintLongLong (char *text, size_t maxlen, SDL_FormatInfo *info, Sint64 value) |
static size_t | SDL_PrintUnsignedLongLong (char *text, size_t maxlen, SDL_FormatInfo *info, Uint64 value) |
static size_t | SDL_PrintFloat (char *text, size_t maxlen, SDL_FormatInfo *info, double arg) |
int | SDL_vsnprintf (SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap) |
Variables | |
static const char | ntoa_table [] |
Definition at line 33 of file SDL_string.c.
Referenced by SDL_ScanLong(), SDL_ScanLongLong(), SDL_ScanUintPtrT(), SDL_ScanUnsignedLong(), and SDL_ScanUnsignedLongLong().
#define SDL_isupperhex | ( | X | ) | (((X) >= 'A') && ((X) <= 'F')) |
Definition at line 32 of file SDL_string.c.
Referenced by SDL_ScanLong(), SDL_ScanLongLong(), SDL_ScanUintPtrT(), SDL_ScanUnsignedLong(), and SDL_ScanUnsignedLongLong().
Definition at line 36 of file SDL_string.c.
Referenced by SDL_utf8strlcpy().
Definition at line 37 of file SDL_string.c.
Referenced by SDL_utf8strlcpy().
enum SDL_letter_case |
Enumerator | |
---|---|
SDL_CASE_NOCHANGE | |
SDL_CASE_LOWER | |
SDL_CASE_UPPER |
Definition at line 1332 of file SDL_string.c.
double SDL_atof | ( | const char * | string | ) |
Definition at line 802 of file SDL_string.c.
References NULL, and SDL_strtod().
Referenced by SDL_memset4().
int SDL_atoi | ( | const char * | string | ) |
Definition at line 793 of file SDL_string.c.
References NULL, and SDL_strtol().
Referenced by SDL_memset4().
char* SDL_itoa | ( | int | value, |
char * | string, | ||
int | radix | ||
) |
char* SDL_lltoa | ( | Sint64 | value, |
char * | string, | ||
int | radix | ||
) |
Definition at line 750 of file SDL_string.c.
References SDL_ulltoa().
Referenced by SDL_memset4(), and SDL_PrintLongLong().
char* SDL_ltoa | ( | long | value, |
char * | string, | ||
int | radix | ||
) |
Definition at line 706 of file SDL_string.c.
References SDL_ultoa().
Referenced by SDL_itoa(), SDL_memset4(), and SDL_PrintLong().
Definition at line 387 of file SDL_string.c.
Referenced by SDL_memset4().
void* SDL_memcpy | ( | SDL_OUT_BYTECAP(len) void * | dst, |
SDL_IN_BYTECAP(len) const void * | src, | ||
size_t | len | ||
) |
Definition at line 310 of file SDL_string.c.
References memcpy.
Referenced by SDL_memcpy4(), SDL_memset4(), SDL_strdup(), SDL_strlcpy(), SDL_utf8strlcpy(), and SDL_wcslcpy().
void* SDL_memmove | ( | SDL_OUT_BYTECAP(len) void * | dst, |
SDL_IN_BYTECAP(len) const void * | src, | ||
size_t | len | ||
) |
void* SDL_memset | ( | SDL_OUT_BYTECAP(len) void * | dst, |
int | c, | ||
size_t | len | ||
) |
|
static |
Definition at line 1421 of file SDL_string.c.
References SDL_FormatInfo::force_sign, SDL_FormatInfo::force_type, NULL, SDL_FormatInfo::pad_zeroes, SDL_FormatInfo::precision, SDL_min, SDL_PrintUnsignedLong(), text, and SDL_FormatInfo::width.
Referenced by SDL_vsnprintf().
|
static |
Definition at line 1385 of file SDL_string.c.
References SDL_FormatInfo::radix, SDL_ltoa(), and SDL_PrintString().
Referenced by SDL_vsnprintf().
|
static |
Definition at line 1403 of file SDL_string.c.
References SDL_FormatInfo::radix, SDL_lltoa(), and SDL_PrintString().
Referenced by SDL_vsnprintf().
|
static |
Definition at line 1352 of file SDL_string.c.
References SDL_FormatInfo::force_case, NULL, SDL_FormatInfo::pad_zeroes, SDL_CASE_LOWER, SDL_CASE_UPPER, SDL_min, SDL_strlcpy(), SDL_strlen(), SDL_strlwr(), SDL_strupr(), and SDL_FormatInfo::width.
Referenced by SDL_PrintLong(), SDL_PrintLongLong(), SDL_PrintUnsignedLong(), SDL_PrintUnsignedLongLong(), and SDL_vsnprintf().
|
static |
Definition at line 1394 of file SDL_string.c.
References SDL_FormatInfo::radix, SDL_PrintString(), and SDL_ultoa().
Referenced by SDL_PrintFloat(), and SDL_vsnprintf().
|
static |
Definition at line 1412 of file SDL_string.c.
References SDL_FormatInfo::radix, SDL_PrintString(), and SDL_ulltoa().
Referenced by SDL_vsnprintf().
|
static |
Definition at line 231 of file SDL_string.c.
References SDL_FALSE, SDL_isdigit, SDL_ScanUnsignedLong(), SDL_TRUE, and text.
Referenced by SDL_strtod(), and SDL_vsscanf().
|
static |
Definition at line 53 of file SDL_string.c.
References SDL_FALSE, SDL_isdigit, SDL_islowerhex, SDL_isupperhex, SDL_strncmp(), SDL_TRUE, and text.
Referenced by SDL_strtol(), and SDL_vsscanf().
Definition at line 158 of file SDL_string.c.
References SDL_FALSE, SDL_isdigit, SDL_islowerhex, SDL_isupperhex, SDL_strncmp(), SDL_TRUE, and text.
Referenced by SDL_strtoll(), and SDL_vsscanf().
Definition at line 126 of file SDL_string.c.
References SDL_isdigit, SDL_islowerhex, SDL_isupperhex, SDL_strncmp(), and text.
Referenced by SDL_vsscanf().
|
static |
Definition at line 94 of file SDL_string.c.
References SDL_isdigit, SDL_islowerhex, SDL_isupperhex, SDL_strncmp(), and text.
Referenced by SDL_ScanFloat(), SDL_strtoul(), and SDL_vsscanf().
Definition at line 199 of file SDL_string.c.
References SDL_isdigit, SDL_islowerhex, SDL_isupperhex, SDL_strncmp(), and text.
Referenced by SDL_strtoull(), and SDL_vsscanf().
int SDL_snprintf | ( | SDL_OUT_Z_CAP(maxlen) char * | text, |
size_t | maxlen, | ||
SDL_PRINTF_FORMAT_STRING const char * | fmt, | ||
... | |||
) |
Definition at line 1310 of file SDL_string.c.
References retval, SDL_OUT_Z_CAP, and SDL_vsnprintf().
Referenced by SDL_memset4().
int SDL_sscanf | ( | const char * | text, |
SDL_SCANF_FORMAT_STRING const char * | fmt, | ||
... | |||
) |
Definition at line 1018 of file SDL_string.c.
References SDL_vsscanf(), and text.
Referenced by SDL_memset4().
int SDL_strcasecmp | ( | const char * | str1, |
const char * | str2 | ||
) |
char* SDL_strchr | ( | const char * | string, |
int | c | ||
) |
Definition at line 622 of file SDL_string.c.
References NULL, and SDL_const_cast.
Referenced by SDL_memset4().
int SDL_strcmp | ( | const char * | str1, |
const char * | str2 | ||
) |
Definition at line 929 of file SDL_string.c.
Referenced by SDL_memset4().
char* SDL_strdup | ( | const char * | string | ) |
Definition at line 562 of file SDL_string.c.
References SDL_malloc, SDL_memcpy(), and SDL_strlen().
Referenced by SDL_memset4().
size_t SDL_strlcat | ( | SDL_INOUT_Z_CAP(maxlen) char * | dst, |
const char * | src, | ||
size_t | maxlen | ||
) |
Definition at line 547 of file SDL_string.c.
References SDL_strlcpy(), and SDL_strlen().
Referenced by SDL_memset4().
size_t SDL_strlcpy | ( | SDL_OUT_Z_CAP(maxlen) char * | dst, |
const char * | src, | ||
size_t | maxlen | ||
) |
Definition at line 481 of file SDL_string.c.
References SDL_memcpy(), SDL_min, and SDL_strlen().
Referenced by SDL_memset4(), SDL_PrintString(), and SDL_strlcat().
size_t SDL_strlen | ( | const char * | string | ) |
Definition at line 406 of file SDL_string.c.
Referenced by SDL_memset4(), SDL_PrintString(), SDL_strdup(), SDL_strlcat(), SDL_strlcpy(), SDL_strrchr(), SDL_strrev(), SDL_strstr(), SDL_strtol(), SDL_strtoll(), SDL_strtoul(), SDL_strtoull(), and SDL_utf8strlcpy().
char* SDL_strlwr | ( | char * | string | ) |
Definition at line 607 of file SDL_string.c.
References SDL_tolower.
Referenced by SDL_memset4(), and SDL_PrintString().
int SDL_strncasecmp | ( | const char * | str1, |
const char * | str2, | ||
size_t | maxlen | ||
) |
int SDL_strncmp | ( | const char * | str1, |
const char * | str2, | ||
size_t | maxlen | ||
) |
Definition at line 945 of file SDL_string.c.
Referenced by SDL_memset4(), SDL_ScanLong(), SDL_ScanLongLong(), SDL_ScanUintPtrT(), SDL_ScanUnsignedLong(), SDL_ScanUnsignedLongLong(), SDL_strstr(), SDL_strtol(), SDL_strtoll(), SDL_strtoul(), SDL_strtoull(), SDL_vsnprintf(), and SDL_vsscanf().
char* SDL_strrchr | ( | const char * | string, |
int | c | ||
) |
Definition at line 640 of file SDL_string.c.
References NULL, SDL_const_cast, and SDL_strlen().
Referenced by SDL_memset4().
char* SDL_strrev | ( | char * | string | ) |
Definition at line 573 of file SDL_string.c.
References SDL_strlen().
Referenced by SDL_memset4(), SDL_ulltoa(), and SDL_ultoa().
char* SDL_strstr | ( | const char * | haystack, |
const char * | needle | ||
) |
Definition at line 659 of file SDL_string.c.
References NULL, SDL_const_cast, SDL_strlen(), and SDL_strncmp().
Referenced by SDL_memset4().
double SDL_strtod | ( | const char * | string, |
char ** | endp | ||
) |
Definition at line 912 of file SDL_string.c.
References SDL_ScanFloat().
Referenced by SDL_atof(), and SDL_memset4().
long SDL_strtol | ( | const char * | string, |
char ** | endp, | ||
int | base | ||
) |
Definition at line 812 of file SDL_string.c.
References SDL_ScanLong(), SDL_strlen(), and SDL_strncmp().
Referenced by SDL_atoi(), SDL_memset4(), and SDL_vsnprintf().
Sint64 SDL_strtoll | ( | const char * | string, |
char ** | endp, | ||
int | base | ||
) |
Definition at line 862 of file SDL_string.c.
References SDL_ScanLongLong(), SDL_strlen(), and SDL_strncmp().
Referenced by SDL_memset4().
unsigned long SDL_strtoul | ( | const char * | string, |
char ** | endp, | ||
int | base | ||
) |
Definition at line 837 of file SDL_string.c.
References SDL_ScanUnsignedLong(), SDL_strlen(), and SDL_strncmp().
Referenced by SDL_memset4().
Uint64 SDL_strtoull | ( | const char * | string, |
char ** | endp, | ||
int | base | ||
) |
Definition at line 887 of file SDL_string.c.
References SDL_ScanUnsignedLongLong(), SDL_strlen(), and SDL_strncmp().
Referenced by SDL_memset4().
char* SDL_strupr | ( | char * | string | ) |
Definition at line 592 of file SDL_string.c.
References SDL_toupper.
Referenced by SDL_memset4(), and SDL_PrintString().
char* SDL_uitoa | ( | unsigned int | value, |
char * | string, | ||
int | radix | ||
) |
char* SDL_ulltoa | ( | Uint64 | value, |
char * | string, | ||
int | radix | ||
) |
Definition at line 769 of file SDL_string.c.
References SDL_strrev().
Referenced by SDL_lltoa(), SDL_memset4(), and SDL_PrintUnsignedLongLong().
char* SDL_ultoa | ( | unsigned long | value, |
char * | string, | ||
int | radix | ||
) |
Definition at line 725 of file SDL_string.c.
References SDL_strrev().
Referenced by SDL_ltoa(), SDL_memset4(), SDL_PrintUnsignedLong(), and SDL_uitoa().
size_t SDL_utf8strlcpy | ( | SDL_OUT_Z_CAP(dst_bytes) char * | dst, |
const char * | src, | ||
size_t | dst_bytes | ||
) |
Definition at line 497 of file SDL_string.c.
References i, SDL_memcpy(), SDL_min, SDL_strlen(), UTF8_IsLeadByte, UTF8_IsTrailingByte, and UTF8_TrailingBytes().
Referenced by SDL_memset4().
size_t SDL_utf8strlen | ( | const char * | str | ) |
int SDL_vsnprintf | ( | SDL_OUT_Z_CAP(maxlen) char * | text, |
size_t | maxlen, | ||
const char * | fmt, | ||
va_list | ap | ||
) |
Definition at line 1524 of file SDL_string.c.
References done, SDL_FormatInfo::force_case, SDL_FormatInfo::force_sign, SDL_FormatInfo::force_type, SDL_FormatInfo::left_justify, SDL_FormatInfo::pad_zeroes, SDL_FormatInfo::precision, SDL_FormatInfo::radix, SDL_CASE_LOWER, SDL_CASE_NOCHANGE, SDL_CASE_UPPER, SDL_FALSE, SDL_free, SDL_iconv_string, SDL_min, SDL_PrintFloat(), SDL_PrintLong(), SDL_PrintLongLong(), SDL_PrintString(), SDL_PrintUnsignedLong(), SDL_PrintUnsignedLongLong(), SDL_strncmp(), SDL_strtol(), SDL_TRUE, SDL_wcslen(), SDL_zero, text, and SDL_FormatInfo::width.
Referenced by SDL_memset4(), and SDL_snprintf().
int SDL_vsscanf | ( | const char * | text, |
const char * | fmt, | ||
va_list | ap | ||
) |
Definition at line 1036 of file SDL_string.c.
References done, retval, SDL_FALSE, SDL_isspace, SDL_ScanFloat(), SDL_ScanLong(), SDL_ScanLongLong(), SDL_ScanUintPtrT(), SDL_ScanUnsignedLong(), SDL_ScanUnsignedLongLong(), SDL_strncmp(), SDL_tolower, SDL_TRUE, and text.
Referenced by SDL_memset4(), and SDL_sscanf().
int SDL_wcscmp | ( | const wchar_t * | str1, |
const wchar_t * | str2 | ||
) |
Definition at line 465 of file SDL_string.c.
Referenced by SDL_memset4().
size_t SDL_wcslcat | ( | SDL_INOUT_Z_CAP(maxlen) wchar_t * | dst, |
const wchar_t * | src, | ||
size_t | maxlen | ||
) |
Definition at line 450 of file SDL_string.c.
References SDL_wcslcpy(), and SDL_wcslen().
Referenced by SDL_memset4().
size_t SDL_wcslcpy | ( | SDL_OUT_Z_CAP(maxlen) wchar_t * | dst, |
const wchar_t * | src, | ||
size_t | maxlen | ||
) |
Definition at line 434 of file SDL_string.c.
References SDL_memcpy(), SDL_min, and SDL_wcslen().
Referenced by SDL_memset4(), and SDL_wcslcat().
size_t SDL_wcslen | ( | const wchar_t * | string | ) |
Definition at line 420 of file SDL_string.c.
Referenced by SDL_memset4(), SDL_vsnprintf(), SDL_wcslcat(), and SDL_wcslcpy().
|
static |
Definition at line 39 of file SDL_string.c.
Referenced by SDL_utf8strlcpy().
|
static |
Definition at line 677 of file SDL_string.c.