Converting multi-byte to wide characters

Started by
1 comment, last by beebs1 16 years, 9 months ago
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 :)
Advertisement
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.
Thanks, that's exactly what I needed.

This topic is closed to new replies.

Advertisement