---
name: "SDL_vswprintf"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_vswprintf"
---

# SDL\_vswprintf(3)

This works exactly like vswprintf() but doesn't require access to a C runtime.

## NAME

SDL\_vswprintf - This works exactly like vswprintf() but doesn't require access to a C runtime.

## HEADER FILE

Defined in SDL3/SDL\_stdinc.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**int SDL\_vswprintf(wchar\_t \*text, size\_t maxlen, const wchar\_t \*fmt, va\_list ap);**

## DESCRIPTION

Functions identically to  **SDL\_swprintf** (), except it takes a **va\_list** instead of using **...** variable arguments.

## FUNCTION PARAMETERS

- *text*

  the buffer to write the string into. Must not be NULL.

- *maxlen*

  the maximum wide characters to write, including the null-terminator.

- *fmt*

  a printf-style format wide string. Must not be NULL.

- *ap*

  a **va\_list** values to be used with the format string.

## RETURN VALUE

Returns the number of wide characters that should be written, not counting the null-terminator char, or a negative value on error.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.
