Difference between revisions of "cpp/string/multibyte/mbstowcs"
From cppreference.com
m (Shorten template names. Use {{lc}} where appropriate.) |
m (Update links.) |
||
Line 52: | Line 52: | ||
===See also=== | ===See also=== | ||
{{dsc begin}} | {{dsc begin}} | ||
− | {{dsc inc | cpp/string/multibyte/ | + | {{dsc inc | cpp/string/multibyte/mbsrtowcs}} |
− | {{dsc inc | cpp/string/multibyte/ | + | {{dsc inc | cpp/string/multibyte/wcstombs}} |
− | {{dsc inc | cpp/locale/codecvt/ | + | {{dsc inc | cpp/locale/codecvt/do_in}} |
{{dsc see c | c/string/multibyte/mbstowcs}} | {{dsc see c | c/string/multibyte/mbstowcs}} | ||
{{dsc end}} | {{dsc end}} |
Revision as of 23:26, 31 May 2013
Defined in header <cstdlib>
|
||
std::size_t mbstowcs( wchar_t* dst, const char* src, std::size_t len) |
||
Converts a multibyte character string from the array whose first element is pointed to by src
to its wide character representation. Converted characters are stored in the successive elements of the array pointed to by dst
. No more than len
wide characters are written to the destination array.
Each character is converted as if by a call to std::mbtowc, except that the mbtowc conversion state is unaffected. The conversion stops if:
- The multibyte null character was converted and stored.
- An invalid (in the current C locale) multibyte character was encountered.
- The next wide character to be stored would exceed
len
.
Contents |