create a string with std string, you can also pass a c string pointer because the default constructor of gd::string can access a c string pointer.
Class CCString
#include <Geode/cocos/cocoa/CCString.h>
classCCString:publiccocos2d::CCObject{ ... }
No description provided
Examples0
Public static methods4
staticcocos2d::CCString*create()
A CCString pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it.
staticcocos2d::CCString*createWithFormat(charconst*format)
create a string with format, it’s similar with the c function ‘sprintf’, the default buffer size is (1024*100) bytes, if you want to change it, you should modify the kMaxStringLen macro in CCString.cpp file.
A CCString pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it.
staticcocos2d::CCString*createWithData(ucharconst*pData,unsigned longnLen)
create a string with binary data
A CCString pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it.
staticcocos2d::CCString*createWithContentsOfFile(charconst*pszFileName)
create a string with a file,
A CCString pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it.
Public member functions13
cocos2d::CCString&operator=()
No description provided
boolinitWithFormat(charconst*format)
init a string with format, it’s similar with the c function ‘sprintf’
intintValue()const
convert to int value
uintuintValue()const
convert to unsigned int value
floatfloatValue()const
convert to float value
doubledoubleValue()const
convert to double value
boolboolValue()const
convert to bool value
charconst*getCString()const
get the C string
uintlength()const
get the length of string
intcompare()const
compare to a c string
virtualcocos2d::CCObject*copyWithZone(cocos2d::CCZone*pZone)
No description provided
virtualboolisEqual(cocos2d::CCObjectconst*pObject)
No description provided
virtualvoidacceptVisitor(cocos2d::CCDataVisitor&visitor)
No description provided
Fields1
gd::stringm_sString;
No description provided