strlist.hpp 770 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _RAR_STRLIST_
  2. #define _RAR_STRLIST_
  3. class StringList
  4. {
  5. private:
  6. Array<wchar> StringData;
  7. size_t CurPos;
  8. size_t StringsCount;
  9. size_t SaveCurPos[16],SavePosNumber;
  10. public:
  11. StringList();
  12. void Reset();
  13. void AddStringA(const char *Str);
  14. void AddString(const wchar *Str);
  15. bool GetStringA(char *Str,size_t MaxLength);
  16. bool GetString(wchar *Str,size_t MaxLength);
  17. bool GetString(wchar *Str,size_t MaxLength,int StringNum);
  18. wchar* GetString();
  19. bool GetString(wchar **Str);
  20. void Rewind();
  21. size_t ItemsCount() {return StringsCount;};
  22. size_t GetCharCount() {return StringData.Size();}
  23. bool Search(const wchar *Str,bool CaseSensitive);
  24. void SavePosition();
  25. void RestorePosition();
  26. };
  27. #endif