21.Conversion of Unicode and Multibyte

ProudNet is based on Unicode so we actually recommend you to use Unicode in your development project.

But, in any event that you can't use Unicode(like if you have already made programs not based on Unicode), you will be required to convert the input sting of ProudNet to Unicode and the output string of ProudNet to Multibyte code(MBC). The classes that perform this are Proud::StringA2W and Proud::StringW2A.

Proud::StringA2W class helps converting MBC to Unicode and Proud::StringW2A in vice-versa.

Following is an example.

void Foo()
{
    // Converting to MBC from Unicode
    Proud::String a=L"abc";
    const char* b=Proud::StringW2A(a);
    
    // Converting to Unicode from MBC
    Proud::String c=Proud::StringA2W(b);
}