cocos2d::StringUtils

cocos2d::StringUtils::toString  method can generate std::string  value from variety of values

int i= 100;
std::string int_string= cocos2d::StringUtils::toString(i);
CCLOG("%s", int_string.c_str());
float j= 123.4f;
std::string float_string= cocos2d::StringUtils::toString(j);
CCLOG("%s", float_string.c_str());

cocos2d::StringUtils::format  method can generate the std::string  value using sprintf  format.