#include <CCString.h>
|
static __String * | 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. More...
|
|
static __String * | createWithFormat (const char *format,...) CC_FORMAT_PRINTF(1 |
| 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 kMax__StringLen macro in __String.cpp file. More...
|
|
static __String static __String * | createWithData (const unsigned char *pData, size_t nLen) |
| create a string with binary data More...
|
|
static __String * | createWithContentsOfFile (const std::string &filename) |
| create a string with a file, More...
|
|
void append |
( |
const std::string & |
str | ) |
|
append additional characters at the end of its current value NA NA
void appendWithFormat |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
append(w/ format) additional characters at the end of its current value NA NA
int compare |
( |
const char * |
| ) |
const |
__Array* componentsSeparatedByString |
( |
const char * |
delimiter | ) |
|
static __String* 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 String pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it. NA
static __String* createWithContentsOfFile |
( |
const std::string & |
filename | ) |
|
|
static |
create a string with a file,
- Returns
- A String pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it. NA
static __String static __String* createWithData |
( |
const unsigned char * |
pData, |
|
|
size_t |
nLen |
|
) |
| |
|
static |
create a string with binary data
- Returns
- A String pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it. NA
static __String* 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 kMax__StringLen macro in __String.cpp file.
- Returns
- A String pointer which is an autorelease object pointer, it means that you needn't do a release operation unless you retain it. NA
double doubleValue |
( |
| ) |
const |
convert to double value NA
float floatValue |
( |
| ) |
const |
convert to float value NA
const char* getCString |
( |
| ) |
const |
bool initWithFormat |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
init a string with format, it's similar with the c function 'sprintf' NA NA
bool int intValue |
( |
| ) |
const |
virtual bool isEqual |
( |
const Ref * |
pObject | ) |
|
|
virtual |
get the length of string NA
unsigned int uintValue |
( |
| ) |
const |
convert to unsigned int value NA
The documentation for this class was generated from the following file:
- /Users/huihoo/Software/huihoo-code/cocos2d-x/cocos2d-x-3.3/cocos/deprecated/CCString.h