cpp/string/multibyte/mbstowcs

Converts a multibyte character string from the array whose first element is pointed to by to its wide character representation. Converted characters are stored in the successive elements of the array pointed to by. No more than wide characters are written to the destination array.

Each character is converted as if by a call to std, 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.

Return value
On success, returns the number of wide characters, excluding the terminating, written to the destination array.

On conversion error (if invalid multibyte character was encountered), returns.