wcsrtombs 受到当前区域设置中 LC_TYPE 类别的影响。wcsrtombs 函数的可重启性不同于 wcstombs、_wcstombs_l。 转换状态存储在 mbstate 中,以便后续调用相同的或其他可重启函数。 混合使用可重启函数和不可重启函数时,结果不确定。 例如,如果使用 wcsrlen(而非 wcsnlen)的后续调用,则应用程序应使用 wcsrtombs,而非...
从mbstate 中包含的指定转换状态开始,wcsrtombs 函数将 wcstr 中间接指向的宽字符字符串值转换为 mbstr 地址。 在遇到 null 终止宽字符或非相应字符或在下一个字符将超过 count 中的限制之前,每个字符的转换都将会一直进行。 如果 wcsrtombs 在count 出现前或出现时遇到宽字符 null 字符 (L'\0'),则它将该...
wcsrtombs関数限り、現在のスレッドで関数を呼び出すマルチ スレッドに対して安全であるsetlocaleこの関数の実行中、mbstatenull ではないです。 使用例 コピー // crt_wcsrtombs.cpp // compile with: /W3 // This code example converts a wide // character string into a multibyte // character ...
只要当前线程中的函数都不调用setlocale,此函数正在执行且mbstate是 null,wcsrtombs函数就是多线程安全的。 示例 // crt_wcsrtombs.cpp // compile with: /W3 // This code example converts a wide // character string into a multibyte // character string. #include <stdio.h> #include <memory.h> #inc...
wcsrtombs() almacena el valor de la macro EILSEQ en errno y devuelve (size_t) -1, pero el estado de conversión no cambiará. De lo contrario, devuelve el número de bytes de la secuencia de caracteres multibyte resultante, que es el mismo que el número de elementos de matriz ca...
size_t wcsrtombs( char (&mbstr)[size], const wchar_t **wcstr, sizeof count, mbstate_t *mbstate ); // C++ only Return Value Returns the number of bytes successfully converted, not including the null terminating null byte (if any), otherwise a -1 if an error occurred. ...
wcsrtombs函數會從src間接指向的陣列,將一系列寬字元轉換成一連串對應的字元,從ps所指向的物件所說明的轉換狀態開始。如果dst不是空值指標,則轉換的字元會儲存在dst所指向的陣列中。 轉換會繼續直到且包括也會儲存的終止空值寬字元。 在下列情況下,轉換會提早停止: ...
wcrtomb 给定状态,转换宽字符到其多字节表示 (函数) mbsrtowcs 给定状态,转换窄多字节字符串到宽字符串 (函数) do_out [虚] 将字符串从 InternT 转换到 ExternT,例如在写入文件时 (std::codecvt<InternT,ExternT,StateT> 的虚受保护成员函数) wcsrtombs 的C 文档 ...
std::size_t wcsrtombs( char* dst, const wchar_t** src, std::size_t len, std::mbstate_t* ps ); Converts a sequence of wide characters from the array whose first element is pointed to by *src to its narrow multibyte representation that begins in the conversion state described by *...
Merged colin-home merged 3 commits into MicrosoftDocs:master from MSDN-WhiteKnight:patch-1 Apr 19, 2019 +2 −2 Conversation 2 Commits 3 Checks 0 Files changed 2 Update wcsrtombs-s.md f288909 Workflow runs completed with no jobs Footer...