sdlWcscmp function

int sdlWcscmp(
  1. Pointer<Int16> str1,
  2. Pointer<Int16> str2
)

Compare two null-terminated wide strings.

This only compares wchar_t values until it hits a null-terminating character; it does not care if the string is well-formed UTF-16 (or UTF-32, depending on your platform's wchar_t size), or uses valid Unicode values.

\param str1 the first string to compare. NULL is not permitted! \param str2 the second string to compare. NULL is not permitted! \returns less than zero if str1 is "less than" str2, greater than zero if str1 is "greater than" str2, and zero if the strings match exactly.

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

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2)

Implementation

int sdlWcscmp(Pointer<Int16> str1, Pointer<Int16> str2) {
  final sdlWcscmpLookupFunction = libSdl3.lookupFunction<
      Int32 Function(Pointer<Int16> str1, Pointer<Int16> str2),
      int Function(Pointer<Int16> str1, Pointer<Int16> str2)>('SDL_wcscmp');
  return sdlWcscmpLookupFunction(str1, str2);
}