table of contents
SDL_strlcpy(3) | SDL3 FUNCTIONS | SDL_strlcpy(3) |
NAME¶
SDL_strlcpy - Copy a string.
SYNOPSIS¶
#include <SDL3/SDL_stdinc.h>
size_t SDL_strlcpy(char *dst, const char *src, size_t maxlen);
DESCRIPTION¶
This function copies up to maxlen - 1 characters from src to dst, then appends a null terminator.
If maxlen is 0, no characters are copied and no null terminator is written.
If you want to copy an UTF-8 string but need to ensure that multi-byte sequences are not truncated, consider using SDL_utf8strlcpy().
FUNCTION PARAMETERS¶
RETURN VALUE¶
Returns the length (in characters, excluding the null terminator) of src.
THREAD SAFETY¶
It is safe to call this function from any thread.
AVAILABILITY¶
This function is available since SDL 3.2.0.
SEE ALSO¶
SDL 3.2.14 | Simple Directmedia Layer |