You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
717 B
41 lines
717 B
|
|
#ifndef MYSTRING_H_
|
|
#define MYSTRING_H_
|
|
|
|
|
|
|
|
const MAX_LEN = 100;
|
|
|
|
#if DBG
|
|
void TraceMsg(PCWSTR szFormat, ...);
|
|
#else
|
|
inline void TraceMsg(PCWSTR szFormat, ...) {}
|
|
#endif
|
|
|
|
|
|
|
|
class MyString
|
|
{
|
|
private:
|
|
int m_len;
|
|
wchar_t data[MAX_LEN];
|
|
public:
|
|
MyString();
|
|
MyString(wchar_t *str);
|
|
MyString(const MyString &);
|
|
|
|
const MyString& operator= (PCWSTR lp);
|
|
const MyString& operator= (const MyString& MyStr);
|
|
|
|
VOID append(const wchar_t* str);
|
|
void append(MyString str);
|
|
int len();
|
|
const wchar_t* wcharptr();
|
|
const wchar_t* c_str() const;
|
|
void Zero();
|
|
void NullTerminate();
|
|
};
|
|
|
|
int compare(MyString first, MyString second);
|
|
|
|
#endif
|