#include <CCString.h>
Public Member Functions | |
| __String () | |
| __String (const char *str) | |
| __String (const std::string &str) | |
| __String (const __String &str) | |
| virtual | ~__String () |
| __String & | operator= (const __String &other) |
| local | operator= ( local other) |
| bool | initWithFormat (const char *format,...) CC_FORMAT_PRINTF(2 |
| init a string with format, it's similar with the c function 'sprintf' More... | |
| bool int | intValue () const |
| convert to int value More... | |
| unsigned int | uintValue () const |
| convert to unsigned int value More... | |
| local | uintValue () |
| convert to unsigned int value More... | |
| float | floatValue () const |
| convert to float value More... | |
| local | floatValue () |
| convert to float value More... | |
| double | doubleValue () const |
| convert to double value More... | |
| local | doubleValue () |
| convert to double value More... | |
| bool | boolValue () const |
| convert to bool value More... | |
| local | boolValue () |
| convert to bool value More... | |
| const char * | getCString () const |
| get the C string More... | |
| local | getCString () |
| get the C string More... | |
| int | length () const |
| get the length of string More... | |
| local | length () |
| get the length of string More... | |
| int | compare (const char *) const |
| compare to a c string More... | |
| local | compare () |
| compare to a c string More... | |
| void | append (const std::string &str) |
| append additional characters at the end of its current value More... | |
| void | appendWithFormat (const char *format,...) |
| append(w/ format) additional characters at the end of its current value More... | |
| __Array * | componentsSeparatedByString (const char *delimiter) |
| split a string More... | |
| virtual bool | isEqual (const Ref *pObject) |
| var | isEqual ( var pObject) |
| local | isEqual ( local pObject) |
| virtual void | acceptVisitor (DataVisitor &visitor) |
| virtual __String * | clone () const |
| returns a copy of the Ref More... | |
Public Member Functions inherited from Ref | |
| void | retain () |
| Retains the ownership. More... | |
| void | release () |
| Releases the ownership immediately. More... | |
| Ref * | autorelease () |
| Releases the ownership sometime soon automatically. More... | |
| unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count. More... | |
| virtual | ~Ref () |
Public Member Functions inherited from Clonable | |
| virtual | ~Clonable () |
| Ref * | copy () const |
| returns a copy of the Ref. More... | |
| var | copy () |
| returns a copy of the Ref. More... | |
| local | copy () |
| returns a copy of the Ref. More... | |
Static Public Member Functions | |
| 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... | |
| local | create ( local 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... | |
| local | createWithData ( local pData, local nLen) |
| create a string with binary data More... | |
| static __String * | createWithContentsOfFile (const std::string &filename) |
| create a string with a file, More... | |
| local | createWithContentsOfFile ( local filename) |
| create a string with a file, More... | |
Public Attributes | |
| std::string | _string |
Additional Inherited Members | |
Protected Member Functions inherited from Ref | |
| Ref () | |
| Constructor. More... | |
| Ref () | |
| Constructor. More... | |
Protected Attributes inherited from Ref | |
| unsigned int | _referenceCount |
| count of references More... | |
| var | _referenceCount |
| count of references More... | |
| local | _referenceCount |
| count of references More... | |
| __String | ( | ) |
| __String | ( | const char * | str | ) |
| __String | ( | const std::string & | str | ) |
|
virtual |
|
virtual |
| void append | ( | const std::string & | str | ) |
append additional characters at the end of its current value
| void appendWithFormat | ( | const char * | format, |
| ... | |||
| ) |
append(w/ format) additional characters at the end of its current value
| bool boolValue | ( | ) | const |
convert to bool value
| local boolValue | ( | ) |
convert to bool value
| int compare | ( | const char * | ) | const |
compare to a c string
| local compare | ( | local | ) |
compare to a c string
| __Array* componentsSeparatedByString |
( | const char * | delimiter | ) |
split a string
|
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.
|
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.
|
static |
create a string with a file,
|
static |
create a string with a file,
create a string with binary data
|
static |
create a string with binary data
|
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.
|
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.
| double doubleValue | ( | ) | const |
convert to double value
| local doubleValue | ( | ) |
convert to double value
| float floatValue | ( | ) | const |
convert to float value
| local floatValue | ( | ) |
convert to float value
| const char* getCString | ( | ) | const |
get the C string
| local getCString | ( | ) |
get the C string
| bool initWithFormat | ( | const char * | format, |
| ... | |||
| ) |
init a string with format, it's similar with the c function 'sprintf'
| bool int intValue | ( | ) | const |
convert to int value
| local intValue | ( | ) |
convert to int value
|
virtual |
|
virtual |
|
virtual |
| int length | ( | ) | const |
get the length of string
| local length | ( | ) |
get the length of string
| __String& operator= | ( | var | other | ) |
| __String& operator= | ( | local | other | ) |
| unsigned int uintValue | ( | ) | const |
convert to unsigned int value
| local uintValue | ( | ) |
convert to unsigned int value
| std::string _string |
| var _string |
| local _string |