Class CCString

#include <Geode/cocos/cocoa/CCString.h>
classCCString:publiccocos2d::CCObject{ ... }
No description provided
Examples0
Public static methods4
staticcocos2d::CCString*create()

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.

Return value
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()

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.

Return value
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(,)

create a string with binary data

Return value
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,

Return value
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()

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()
No description provided
virtualboolisEqual()
No description provided
virtualvoidacceptVisitor()
No description provided
Fields1
gd::stringm_sString
;
No description provided
Protected member functions0
Protected fields0