![]() |
DynRPG v0.32 Unofficial
Plugin SDK
|
Mighty wrapper class for DString pointers, the string class for RPG Maker strings. More...
#include <DStringPtr.h>
Public Member Functions | |
| DStringPtr () | |
| Constructor (initializes the pointer to zero) | |
| DStringPtr (DStringPtr &s) | |
| Copy constructor. | |
| DStringPtr (const std::string &s) | |
Constructor (uses a std::string as template) | |
| ~DStringPtr () | |
| Destructor (deallocates the string when the class is destroyed) | |
| operator std::string () | |
Cast operator for std::string (recommended) | |
| operator char * () | |
Cast operator for char * | |
| const DStringPtr & | operator= (std::string rhs) |
Assignment operator for std::string (recommended) | |
| const DStringPtr & | operator= (char *rhs) |
Assignment operator for char * | |
| const DStringPtr & | operator= (const char *rhs) |
Assignment operator for const char * | |
| const DStringPtr & | operator= (DString *rhs) |
Can be used to copy a string by writing newString = oldString.str; | |
| bool | operator== (std::string rhs) |
Comparison operator for std::string. | |
| bool | operator== (const char *rhs) |
Comparison operator for char *. | |
| bool | operator== (DStringPtr &rhs) |
| Comparison operator for other DStringPtr classes. | |
| void | clear () |
| Clears the string. | |
| void | assign (char *s, int len) |
Assigns the string from a char * which may contain null bytes. | |
| std::string | s_str () |
Explicit conversion function to std::string (recommended) | |
| int | length () |
| Returns the length of the string. | |
Public Attributes | |
| DString * | str |
| Pointer to the actual string data. | |
Mighty wrapper class for DString pointers, the string class for RPG Maker strings.
This class can also be used to assign a Delphi string. The string will then automatically be reallocated if necessary.