microsoft / wil

Windows Implementation Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Standard facility to convert between ANSI and UNICODE. Similar to ATL::CA2W and ATL::CW2A

malkindan opened this issue · comments

Is there any standard way to convert strings in WIL? I could not find any examples.

You mean like a wrapper around WideCharToMultiByte & vice-versa? Nothing currently seems to exist from what I can see, but such a thing might be generally useful. E.g. something like wil::WideCharToMultiByte<StringT>(...)/wil::WideCharToMultiByteNoThrow(..., StringT&)

Yes . Wrappers over WideCharToMultiByte and MultiByteToWideChar