Leaked source code of windows server 2003
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

  1. #ifndef MYSTRING_H_
  2. #define MYSTRING_H_
  3. const MAX_LEN = 100;
  4. #if DBG
  5. void TraceMsg(PCWSTR szFormat, ...);
  6. #else
  7. inline void TraceMsg(PCWSTR szFormat, ...) {}
  8. #endif
  9. class MyString
  10. {
  11. private:
  12. int m_len;
  13. wchar_t data[MAX_LEN];
  14. public:
  15. MyString();
  16. MyString(wchar_t *str);
  17. MyString(const MyString &);
  18. const MyString& operator= (PCWSTR lp);
  19. const MyString& operator= (const MyString& MyStr);
  20. VOID append(const wchar_t* str);
  21. void append(MyString str);
  22. int len();
  23. const wchar_t* wcharptr();
  24. const wchar_t* c_str() const;
  25. void Zero();
  26. void NullTerminate();
  27. };
  28. int compare(MyString first, MyString second);
  29. #endif