From C String to String, it's actually the standard constructor
String* cocos2dxString = String::create(“xxxxx”);
|
From String to C String
cocos2dxString->getCString();
|
From String to std::string
From std::string to String (this requires an indirect conversion it seems)
From std::string to C String
cocos2dxString->_string;
|
From std::string to String (this requires an indirect conversion it seems)
String::create(cocos2dxString->_string.c_str());
|
From std::string to C String
stdString.c_str();
|
No comments:
Post a Comment