SimUtil Strings ansiToUnicode 1

From SIMboxWiki
Jump to navigation Jump to search

Icon attributes.pngstatic std::wstring SimUtil::Strings::ansiToUnicode(const std::string &i_StrAnsi)


    Converts string given in ANSI standard to a string in Unicode standard.


    i_StrAnsi - A string containing ANSI characters that will be converted to Unicode.


    Type: std::wstring   Description: A Unicode string containing the converted string.

    Code Sample

          int main(int argc, char* argv[])
	//create ANSI characters string
	string ansiString = "Hello, World!";

	//convert ANSI characters string to Unicode characters string
	wstring unicodeString = SimUtil::Strings::ansiToUnicode(ansiString);

	//print result
	cout<<"The string is:"<<endl;
	return 0;

The string is:
Hello, World!

    See Also