SDL_strlcat(3)

SDL_strlcat3

Concatenate strings.

Usage

#include "SDL3/SDL.h"

size_t SDL_strlcat(char *dst, const char *src, size_t maxlen);

Header file

Defined in SDL3/SDL_stdinc.h

Overview

This function appends up to maxlen

• SDL_strlen (dst) - 1 characters from src to the end of the string in dst , then appends a null terminator. src and dst must not overlap.

If maxlen

• SDL_strlen (dst) - 1 is less than or equal to 0, then dst is unmodified.

Function parameters

dst

The destination buffer already containing the first null-terminated string. Must not be NULL and must not overlap with src .

src

The second null-terminated string. Must not be NULL, and must not overlap with dst .

maxlen

The length (in characters) of the destination buffer.

Return value

Returns the length (in characters, excluding the null terminator) of the string in dst plus the length of src .

Thread safety

It is safe to call this function from any thread.

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.