Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

String into UniString?

Anonymous
Not applicable
How can I convert a string to UniString?

Thanks!
1 ACCEPTED SOLUTION

Solution
leilei
Enthusiast
Hi, you can do this:
std::string sTest;
GS::UniString sToUnistr;
sToUnistr=GS::UniString(sTest.c_str());

View solution in original post

2 REPLIES 2

Solution
leilei
Enthusiast
Hi, you can do this:
std::string sTest;
GS::UniString sToUnistr;
sToUnistr=GS::UniString(sTest.c_str());

View solution in original post

leilei
Enthusiast
Sometimes you need to set character types.When I read the file path through string, I need to do this when I convert to unistring.
std::string sTest;
GS::UniString sToUnistr;
sToUnistr=GS::UniString(sTest.c_str(),CC_SimpChinese);

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!