sdlWcslcpy function

int sdlWcslcpy(
  1. Pointer<NativeType> arg0,
  2. Pointer<Int16> src,
  3. int maxlen
)

Copy a wide string.

This function copies maxlen - 1 wide characters from src to dst, then appends a null terminator.

src and dst must not overlap.

If maxlen is 0, no wide characters are copied and no null terminator is written.

\param dst The destination buffer. Must not be NULL, and must not overlap with src. \param src The null-terminated wide string to copy. Must not be NULL, and must not overlap with dst. \param maxlen The length (in wide characters) of the destination buffer. \returns The length (in wide characters, excluding the null terminator) of src.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.1.3.

\sa SDL_wcslcat

extern SDL_DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen)

Implementation

int sdlWcslcpy(Pointer<NativeType> arg0, Pointer<Int16> src, int maxlen) {
  final sdlWcslcpyLookupFunction = libSdl3.lookupFunction<
      Uint32 Function(
          Pointer<NativeType> arg0, Pointer<Int16> src, Uint32 maxlen),
      int Function(Pointer<NativeType> arg0, Pointer<Int16> src,
          int maxlen)>('SDL_wcslcpy');
  return sdlWcslcpyLookupFunction(arg0, src, maxlen);
}