sdlSnprintf function
extern SDL_DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3)
Implementation
int sdlSnprintf(Pointer<NativeType> arg0, int maxlen, String? fmt,
Pointer<NativeType> arg3) {
final sdlSnprintfLookupFunction = libSdl3.lookupFunction<
Int32 Function(Pointer<NativeType> arg0, Uint32 maxlen, Pointer<Utf8> fmt,
Pointer<NativeType> arg3),
int Function(Pointer<NativeType> arg0, int maxlen, Pointer<Utf8> fmt,
Pointer<NativeType> arg3)>('SDL_snprintf');
final fmtPointer = fmt != null ? fmt.toNativeUtf8() : nullptr;
final result = sdlSnprintfLookupFunction(arg0, maxlen, fmtPointer, arg3);
calloc.free(fmtPointer);
return result;
}