RawSushi's Tech Journal
My online tech scrapbook where I keep my notes in case I need to look them up later
Thursday, December 4, 2014
Cocos2D-X: Substring
It seems like the best way is to convert to a std::string first and use its substr function, so e.g. from a Cocos2D-X String object:
cocos2dxString->_string.substr(pos,len);
Note: for Cocos2D-X 3.0 and above
Reference:
http://www.cplusplus.com/reference/string/string/substr/
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment