snprintf

Prints a formatted string to a sized buffer.

extern (C) nothrow @nogc pragma(printf) extern @trusted pure
int
snprintf
(
char* buffer
,
size_t size
,
const(char)* format
,)

Parameters

buffer char*

The buffer to write to.

size size_t

The size of the buffer.

format const(char)*

The format string. ... = Arguments following format.

Return Value

Type: int

On success, the total number of characters written is returned. A terminating '\0' is automatically written to the buffer after the content.

Meta