isle-portable/LEGO1/omni/include/mxstring.h
Christian Semmler f51b1867ee
Some checks are pending
Build / Current msys2 mingw32 (push) Waiting to run
Build / Current msys2 mingw64 (push) Waiting to run
Build / Current MSVC (32-bit) (push) Waiting to run
Build / Current MSVC (64-bit) (push) Waiting to run
Format / C++ (push) Waiting to run
Naming / C++ (push) Waiting to run
Use SDL3 for filesystem access (#36)
* Use SDL IOStream in for MXIOINFO

* Use SDL IOStream for WDB file

* Use SDL IOStream for LegoStorage

* Update README.md

* Fixes

* Add names to skip.yml

* Add #include <stdio.h> where necessary
2024-12-16 22:25:52 +01:00

52 lines
1.3 KiB
C++

#ifndef MXSTRING_H
#define MXSTRING_H
#include "mxcore.h"
// VTABLE: LEGO1 0x100dc110
// VTABLE: BETA10 0x101c1be0
// SIZE 0x10
class MxString : public MxCore {
public:
MxString();
MxString(const MxString& p_str);
MxString(const char* p_str);
MxString(const char* p_str, MxU16 p_maxlen);
~MxString() override;
void Reverse();
void ToUpperCase();
void ToLowerCase();
void NormalizePath() { NormalizePath(m_data); }
MxString& operator=(const MxString& p_str);
const MxString& operator=(const char* p_str);
MxString operator+(const MxString& p_str) const;
MxString operator+(const char* p_str) const;
MxString& operator+=(const char* p_str);
static void CharSwap(char* p_a, char* p_b);
static void NormalizePath(char* p_path);
// FUNCTION: BETA10 0x10017c50
char* GetData() const { return m_data; }
// FUNCTION: BETA10 0x10067630
const MxU16 GetLength() const { return m_length; }
// FUNCTION: BETA10 0x100d8a30
MxBool Equal(const MxString& p_str) const { return strcmp(m_data, p_str.m_data) == 0; }
// FUNCTION: BETA10 0x1012a810
MxS8 Compare(const MxString& p_str) const { return strcmp(m_data, p_str.m_data); }
// SYNTHETIC: LEGO1 0x100ae280
// SYNTHETIC: BETA10 0x1012c9d0
// MxString::`scalar deleting destructor'
private:
char* m_data; // 0x08
MxU16 m_length; // 0x0c
};
#endif // MXSTRING_H