PyUnicodeUCS2_AsWideChar

Copies the Unicode Object contents into the wchar_t buffer w. At most size wchar_t characters are copied.

Note that the resulting wchar_t string may or may not be 0-terminated. It is the responsibility of the caller to make sure that the wchar_t string is 0-terminated in case this is required by the application.

Returns the number of wchar_t characters copied (excluding a possibly trailing 0-termination character) or -1 in case of an error.

  1. Py_ssize_t PyUnicodeUCS2_AsWideChar(PyUnicodeObject* unicode, const(wchar)* w, Py_ssize_t size)
    version(Python_Unicode_UCS2)
    PyUnicodeUCS2_AsWideChar
  2. alias PyUnicode_AsWideChar = PyUnicodeUCS2_AsWideChar

Meta