mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 15:37:55 -05:00
2d9af630ba
Followed the hint from @madebr in #31 that the next function in MxString was operator+. The one after that is operator+= and both are at 100%. Squashed commits: * Removed unnecessary consts * Replaced malloc/free with new/delete, which solved swapped regs in operator= * Use delete[] when freeing char* m_data
29 lines
596 B
C++
29 lines
596 B
C++
#ifndef MXSTRING_H
|
|
#define MXSTRING_H
|
|
|
|
#include "mxcore.h"
|
|
|
|
class MxString : public MxCore
|
|
{
|
|
public:
|
|
__declspec(dllexport) MxString(const MxString &);
|
|
__declspec(dllexport) virtual ~MxString();
|
|
__declspec(dllexport) const MxString &operator=(const char *);
|
|
|
|
MxString();
|
|
MxString(const char *);
|
|
void ToUpperCase();
|
|
void ToLowerCase();
|
|
MxString& operator=(MxString *);
|
|
MxString operator+(const char *);
|
|
MxString& operator+=(const char *);
|
|
|
|
inline const char *GetData() const { return m_data; }
|
|
|
|
private:
|
|
char *m_data;
|
|
unsigned short m_length;
|
|
|
|
};
|
|
|
|
#endif // MXSTRING_H
|