# CategoryStdinc

SDL provides its own implementation of some of the most important C runtime
functions.

Using these functions allows an app to have access to common C
functionality without depending on a specific C runtime (or a C runtime at
all). More importantly, the SDL implementations work identically across
platforms, so apps can avoid surprises like snprintf() behaving differently
between Windows and Linux builds, or itoa() only existing on some
platforms.

For many of the most common functions, like [SDL_memcpy](SDL_memcpy), SDL
might just call through to the usual C runtime behind the scenes, if it
makes sense to do so (if it's faster and always available/reliable on a
given platform), reducing library size and offering the most optimized
option.

SDL also offers other C-runtime-adjacent functionality in this header that
either isn't, strictly speaking, part of any C runtime standards, like
[SDL_crc32](SDL_crc32)() and [SDL_reinterpret_cast](SDL_reinterpret_cast),
etc. It also offers a few better options, like
[SDL_strlcpy](SDL_strlcpy)(), which functions as a safer form of strcpy().

<!-- END CATEGORY DOCUMENTATION -->

## Functions

<!-- DO NOT HAND-EDIT CATEGORY LISTS, THEY ARE AUTOGENERATED AND WILL BE OVERWRITTEN, BASED ON TAGS IN INDIVIDUAL PAGE FOOTERS. EDIT THOSE INSTEAD. -->
<!-- BEGIN CATEGORY LIST: CategoryStdinc, CategoryAPIFunction -->
- [SDL_abs](SDL_abs)
- [SDL_acos](SDL_acos)
- [SDL_acosf](SDL_acosf)
- [SDL_aligned_alloc](SDL_aligned_alloc)
- [SDL_aligned_alloc_zero](SDL_aligned_alloc_zero)
- [SDL_aligned_free](SDL_aligned_free)
- [SDL_asin](SDL_asin)
- [SDL_asinf](SDL_asinf)
- [SDL_asprintf](SDL_asprintf)
- [SDL_atan](SDL_atan)
- [SDL_atan2](SDL_atan2)
- [SDL_atan2f](SDL_atan2f)
- [SDL_atanf](SDL_atanf)
- [SDL_atof](SDL_atof)
- [SDL_atoi](SDL_atoi)
- [SDL_bsearch](SDL_bsearch)
- [SDL_bsearch_r](SDL_bsearch_r)
- [SDL_calloc](SDL_calloc)
- [SDL_ceil](SDL_ceil)
- [SDL_ceilf](SDL_ceilf)
- [SDL_copysign](SDL_copysign)
- [SDL_copysignf](SDL_copysignf)
- [SDL_cos](SDL_cos)
- [SDL_cosf](SDL_cosf)
- [SDL_crc16](SDL_crc16)
- [SDL_crc32](SDL_crc32)
- [SDL_CreateEnvironment](SDL_CreateEnvironment)
- [SDL_DestroyEnvironment](SDL_DestroyEnvironment)
- [SDL_exp](SDL_exp)
- [SDL_expf](SDL_expf)
- [SDL_fabs](SDL_fabs)
- [SDL_fabsf](SDL_fabsf)
- [SDL_floor](SDL_floor)
- [SDL_floorf](SDL_floorf)
- [SDL_fmod](SDL_fmod)
- [SDL_fmodf](SDL_fmodf)
- [SDL_free](SDL_free)
- [SDL_getenv](SDL_getenv)
- [SDL_getenv_unsafe](SDL_getenv_unsafe)
- [SDL_GetEnvironment](SDL_GetEnvironment)
- [SDL_GetEnvironmentVariable](SDL_GetEnvironmentVariable)
- [SDL_GetEnvironmentVariables](SDL_GetEnvironmentVariables)
- [SDL_GetMemoryFunctions](SDL_GetMemoryFunctions)
- [SDL_GetNumAllocations](SDL_GetNumAllocations)
- [SDL_GetOriginalMemoryFunctions](SDL_GetOriginalMemoryFunctions)
- [SDL_iconv](SDL_iconv)
- [SDL_iconv_close](SDL_iconv_close)
- [SDL_iconv_open](SDL_iconv_open)
- [SDL_iconv_string](SDL_iconv_string)
- [SDL_isalnum](SDL_isalnum)
- [SDL_isalpha](SDL_isalpha)
- [SDL_isblank](SDL_isblank)
- [SDL_iscntrl](SDL_iscntrl)
- [SDL_isdigit](SDL_isdigit)
- [SDL_isgraph](SDL_isgraph)
- [SDL_isinf](SDL_isinf)
- [SDL_isinff](SDL_isinff)
- [SDL_islower](SDL_islower)
- [SDL_isnan](SDL_isnan)
- [SDL_isnanf](SDL_isnanf)
- [SDL_isprint](SDL_isprint)
- [SDL_ispunct](SDL_ispunct)
- [SDL_isspace](SDL_isspace)
- [SDL_isupper](SDL_isupper)
- [SDL_isxdigit](SDL_isxdigit)
- [SDL_itoa](SDL_itoa)
- [SDL_lltoa](SDL_lltoa)
- [SDL_log](SDL_log)
- [SDL_log10](SDL_log10)
- [SDL_log10f](SDL_log10f)
- [SDL_logf](SDL_logf)
- [SDL_lround](SDL_lround)
- [SDL_lroundf](SDL_lroundf)
- [SDL_ltoa](SDL_ltoa)
- [SDL_malloc](SDL_malloc)
- [SDL_memcmp](SDL_memcmp)
- [SDL_memcpy](SDL_memcpy)
- [SDL_memmove](SDL_memmove)
- [SDL_memset](SDL_memset)
- [SDL_memset4](SDL_memset4)
- [SDL_modf](SDL_modf)
- [SDL_modff](SDL_modff)
- [SDL_murmur3_32](SDL_murmur3_32)
- [SDL_pow](SDL_pow)
- [SDL_powf](SDL_powf)
- [SDL_qsort](SDL_qsort)
- [SDL_qsort_r](SDL_qsort_r)
- [SDL_rand](SDL_rand)
- [SDL_rand_bits](SDL_rand_bits)
- [SDL_rand_bits_r](SDL_rand_bits_r)
- [SDL_rand_r](SDL_rand_r)
- [SDL_randf](SDL_randf)
- [SDL_randf_r](SDL_randf_r)
- [SDL_realloc](SDL_realloc)
- [SDL_round](SDL_round)
- [SDL_roundf](SDL_roundf)
- [SDL_scalbn](SDL_scalbn)
- [SDL_scalbnf](SDL_scalbnf)
- [SDL_setenv_unsafe](SDL_setenv_unsafe)
- [SDL_SetEnvironmentVariable](SDL_SetEnvironmentVariable)
- [SDL_SetMemoryFunctions](SDL_SetMemoryFunctions)
- [SDL_sin](SDL_sin)
- [SDL_sinf](SDL_sinf)
- [SDL_size_add_check_overflow](SDL_size_add_check_overflow)
- [SDL_size_mul_check_overflow](SDL_size_mul_check_overflow)
- [SDL_snprintf](SDL_snprintf)
- [SDL_sqrt](SDL_sqrt)
- [SDL_sqrtf](SDL_sqrtf)
- [SDL_srand](SDL_srand)
- [SDL_sscanf](SDL_sscanf)
- [SDL_StepBackUTF8](SDL_StepBackUTF8)
- [SDL_StepUTF8](SDL_StepUTF8)
- [SDL_strcasecmp](SDL_strcasecmp)
- [SDL_strcasestr](SDL_strcasestr)
- [SDL_strchr](SDL_strchr)
- [SDL_strcmp](SDL_strcmp)
- [SDL_strdup](SDL_strdup)
- [SDL_strlcat](SDL_strlcat)
- [SDL_strlcpy](SDL_strlcpy)
- [SDL_strlen](SDL_strlen)
- [SDL_strlwr](SDL_strlwr)
- [SDL_strncasecmp](SDL_strncasecmp)
- [SDL_strncmp](SDL_strncmp)
- [SDL_strndup](SDL_strndup)
- [SDL_strnlen](SDL_strnlen)
- [SDL_strnstr](SDL_strnstr)
- [SDL_strpbrk](SDL_strpbrk)
- [SDL_strrchr](SDL_strrchr)
- [SDL_strrev](SDL_strrev)
- [SDL_strstr](SDL_strstr)
- [SDL_strtod](SDL_strtod)
- [SDL_strtok_r](SDL_strtok_r)
- [SDL_strtol](SDL_strtol)
- [SDL_strtoll](SDL_strtoll)
- [SDL_strtoul](SDL_strtoul)
- [SDL_strtoull](SDL_strtoull)
- [SDL_strupr](SDL_strupr)
- [SDL_swprintf](SDL_swprintf)
- [SDL_tan](SDL_tan)
- [SDL_tanf](SDL_tanf)
- [SDL_tolower](SDL_tolower)
- [SDL_toupper](SDL_toupper)
- [SDL_trunc](SDL_trunc)
- [SDL_truncf](SDL_truncf)
- [SDL_UCS4ToUTF8](SDL_UCS4ToUTF8)
- [SDL_uitoa](SDL_uitoa)
- [SDL_ulltoa](SDL_ulltoa)
- [SDL_ultoa](SDL_ultoa)
- [SDL_unsetenv_unsafe](SDL_unsetenv_unsafe)
- [SDL_UnsetEnvironmentVariable](SDL_UnsetEnvironmentVariable)
- [SDL_utf8strlcpy](SDL_utf8strlcpy)
- [SDL_utf8strlen](SDL_utf8strlen)
- [SDL_utf8strnlen](SDL_utf8strnlen)
- [SDL_vasprintf](SDL_vasprintf)
- [SDL_vsnprintf](SDL_vsnprintf)
- [SDL_vsscanf](SDL_vsscanf)
- [SDL_vswprintf](SDL_vswprintf)
- [SDL_wcscasecmp](SDL_wcscasecmp)
- [SDL_wcscmp](SDL_wcscmp)
- [SDL_wcsdup](SDL_wcsdup)
- [SDL_wcslcat](SDL_wcslcat)
- [SDL_wcslcpy](SDL_wcslcpy)
- [SDL_wcslen](SDL_wcslen)
- [SDL_wcsncasecmp](SDL_wcsncasecmp)
- [SDL_wcsncmp](SDL_wcsncmp)
- [SDL_wcsnlen](SDL_wcsnlen)
- [SDL_wcsnstr](SDL_wcsnstr)
- [SDL_wcsstr](SDL_wcsstr)
- [SDL_wcstol](SDL_wcstol)
- [SDL_wcstoll](SDL_wcstoll)
- [SDL_wcstoul](SDL_wcstoul)
- [SDL_wcstoull](SDL_wcstoull)
<!-- END CATEGORY LIST -->

## Datatypes

<!-- DO NOT HAND-EDIT CATEGORY LISTS, THEY ARE AUTOGENERATED AND WILL BE OVERWRITTEN, BASED ON TAGS IN INDIVIDUAL PAGE FOOTERS. EDIT THOSE INSTEAD. -->
<!-- BEGIN CATEGORY LIST: CategoryStdinc, CategoryAPIDatatype -->
- [SDL_calloc_func](SDL_calloc_func)
- [SDL_CompareCallback](SDL_CompareCallback)
- [SDL_CompareCallback_r](SDL_CompareCallback_r)
- [SDL_Environment](SDL_Environment)
- [SDL_free_func](SDL_free_func)
- [SDL_FunctionPointer](SDL_FunctionPointer)
- [SDL_iconv_t](SDL_iconv_t)
- [SDL_malloc_func](SDL_malloc_func)
- [SDL_realloc_func](SDL_realloc_func)
- [SDL_Time](SDL_Time)
- [Sint16](Sint16)
- [Sint32](Sint32)
- [Sint64](Sint64)
- [Sint8](Sint8)
- [Uint16](Uint16)
- [Uint32](Uint32)
- [Uint64](Uint64)
- [Uint8](Uint8)
<!-- END CATEGORY LIST -->

## Structs

<!-- DO NOT HAND-EDIT CATEGORY LISTS, THEY ARE AUTOGENERATED AND WILL BE OVERWRITTEN, BASED ON TAGS IN INDIVIDUAL PAGE FOOTERS. EDIT THOSE INSTEAD. -->
<!-- BEGIN CATEGORY LIST: CategoryStdinc, CategoryAPIStruct -->
- (none.)
<!-- END CATEGORY LIST -->

## Enums

<!-- DO NOT HAND-EDIT CATEGORY LISTS, THEY ARE AUTOGENERATED AND WILL BE OVERWRITTEN, BASED ON TAGS IN INDIVIDUAL PAGE FOOTERS. EDIT THOSE INSTEAD. -->
<!-- BEGIN CATEGORY LIST: CategoryStdinc, CategoryAPIEnum -->
- (none.)
<!-- END CATEGORY LIST -->

## Macros

<!-- DO NOT HAND-EDIT CATEGORY LISTS, THEY ARE AUTOGENERATED AND WILL BE OVERWRITTEN, BASED ON TAGS IN INDIVIDUAL PAGE FOOTERS. EDIT THOSE INSTEAD. -->
<!-- BEGIN CATEGORY LIST: CategoryStdinc, CategoryAPIMacro -->
- [SDL_arraysize](SDL_arraysize)
- [SDL_clamp](SDL_clamp)
- [SDL_COMPILE_TIME_ASSERT](SDL_COMPILE_TIME_ASSERT)
- [SDL_const_cast](SDL_const_cast)
- [SDL_copyp](SDL_copyp)
- [SDL_FLT_EPSILON](SDL_FLT_EPSILON)
- [SDL_FOURCC](SDL_FOURCC)
- [SDL_iconv_utf8_locale](SDL_iconv_utf8_locale)
- [SDL_iconv_utf8_ucs2](SDL_iconv_utf8_ucs2)
- [SDL_iconv_utf8_ucs4](SDL_iconv_utf8_ucs4)
- [SDL_iconv_wchar_utf8](SDL_iconv_wchar_utf8)
- [SDL_IN_BYTECAP](SDL_IN_BYTECAP)
- [SDL_INIT_INTERFACE](SDL_INIT_INTERFACE)
- [SDL_INOUT_Z_CAP](SDL_INOUT_Z_CAP)
- [SDL_INVALID_UNICODE_CODEPOINT](SDL_INVALID_UNICODE_CODEPOINT)
- [SDL_max](SDL_max)
- [SDL_min](SDL_min)
- [SDL_NOLONGLONG](SDL_NOLONGLONG)
- [SDL_OUT_BYTECAP](SDL_OUT_BYTECAP)
- [SDL_OUT_CAP](SDL_OUT_CAP)
- [SDL_OUT_Z_BYTECAP](SDL_OUT_Z_BYTECAP)
- [SDL_OUT_Z_CAP](SDL_OUT_Z_CAP)
- [SDL_PI_D](SDL_PI_D)
- [SDL_PI_F](SDL_PI_F)
- [SDL_PRILL_PREFIX](SDL_PRILL_PREFIX)
- [SDL_PRILLd](SDL_PRILLd)
- [SDL_PRILLu](SDL_PRILLu)
- [SDL_PRILLx](SDL_PRILLx)
- [SDL_PRILLX](SDL_PRILLX)
- [SDL_PRINTF_FORMAT_STRING](SDL_PRINTF_FORMAT_STRING)
- [SDL_PRINTF_VARARG_FUNC](SDL_PRINTF_VARARG_FUNC)
- [SDL_PRINTF_VARARG_FUNCV](SDL_PRINTF_VARARG_FUNCV)
- [SDL_PRIs32](SDL_PRIs32)
- [SDL_PRIs64](SDL_PRIs64)
- [SDL_PRISZ_PREFIX](SDL_PRISZ_PREFIX)
- [SDL_PRISZu](SDL_PRISZu)
- [SDL_PRISZx](SDL_PRISZx)
- [SDL_PRISZX](SDL_PRISZX)
- [SDL_PRIu32](SDL_PRIu32)
- [SDL_PRIu64](SDL_PRIu64)
- [SDL_PRIX32](SDL_PRIX32)
- [SDL_PRIx32](SDL_PRIx32)
- [SDL_PRIx64](SDL_PRIx64)
- [SDL_PRIX64](SDL_PRIX64)
- [SDL_reinterpret_cast](SDL_reinterpret_cast)
- [SDL_SCANF_FORMAT_STRING](SDL_SCANF_FORMAT_STRING)
- [SDL_SCANF_VARARG_FUNC](SDL_SCANF_VARARG_FUNC)
- [SDL_SCANF_VARARG_FUNCV](SDL_SCANF_VARARG_FUNCV)
- [SDL_SINT64_C](SDL_SINT64_C)
- [SDL_SIZE_MAX](SDL_SIZE_MAX)
- [SDL_stack_alloc](SDL_stack_alloc)
- [SDL_stack_free](SDL_stack_free)
- [SDL_static_cast](SDL_static_cast)
- [SDL_STRINGIFY_ARG](SDL_STRINGIFY_ARG)
- [SDL_UINT64_C](SDL_UINT64_C)
- [SDL_WPRINTF_VARARG_FUNC](SDL_WPRINTF_VARARG_FUNC)
- [SDL_WPRINTF_VARARG_FUNCV](SDL_WPRINTF_VARARG_FUNCV)
- [SDL_zero](SDL_zero)
- [SDL_zeroa](SDL_zeroa)
- [SDL_zerop](SDL_zerop)
<!-- END CATEGORY LIST -->


----
[CategoryAPICategory](CategoryAPICategory)


