#include <CCString.h>
|
| static CCString * | create (const std::string &str) |
| | create a string with std string, you can also pass a c string pointer because the default constructor of std::string can access a c string pointer.
|
| |
| static CCString * | createWithFormat (const char *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.
|
| |
| static CCString * | createWithData (const unsigned char *pData, unsigned long nLen) |
| | create a string with binary data
|
| |
| static CCString * | createWithContentsOfFile (const char *pszFileName) |
| | create a string with a file,
|
| |
| int compare |
( |
const char * |
| ) |
const |
| static CCString* create |
( |
const std::string & |
str | ) |
|
|
static |
create a string with std string, you can also pass a c string pointer because the default constructor of std::string can access a c string pointer.
- Returns
- A CCString pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it.
| static CCString* createWithContentsOfFile |
( |
const char * |
pszFileName | ) |
|
|
static |
create a string with a file,
- Returns
- A CCString pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it.
| static CCString* createWithData |
( |
const unsigned char * |
pData, |
|
|
unsigned long |
nLen |
|
) |
| |
|
static |
create a string with binary data
- Returns
- A CCString pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it.
| static CCString* createWithFormat |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
|
static |
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.
- Returns
- A CCString pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it.
| double doubleValue |
( |
| ) |
const |
| float floatValue |
( |
| ) |
const |
| const char* getCString |
( |
| ) |
const |
| bool initWithFormat |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
init a string with format, it's similar with the c function 'sprintf'
| virtual bool isEqual |
( |
const CCObject * |
pObject | ) |
|
|
virtual |
| unsigned int length |
( |
| ) |
const |
| unsigned int uintValue |
( |
| ) |
const |
convert to unsigned int value
The documentation for this class was generated from the following file:
- /Users/zhangkoumyou/SourceCode/cocos2d-x/cocos2dx/cocoa/CCString.h