Converting multi-byte to wide characters
Hiya,
I've been using the CRT function mbstowcs() to covert narrow to wide strings, but I was wondering if the C++ standard library provdes a way. IIRC std::ios provides narrow() and widen() methods, but they only accept single characters at a time. Is this what I'm going to have to use?
Thanks for any help :)
The ctype facet of a locale has narrow() and widen() functions that accept strings of arbitrary length. Use std::use_facet<>() to get at the locale facet.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement