PST SDK  5.2.0.0-0eac0f6
PstString.h
Go to the documentation of this file.
1 // Copyright PS-Tech B.V. All Rights Reserved.
2 
3 #pragma once
4 
5 #include "PstBase.h"
6 
7 #include <cstddef>
8 
9 namespace PSTech
10 {
11 namespace Utils
12 {
18  {
19  public:
21  PstString();
22 
24  PstString(const char* string);
25 
27  PstString(const PstString& string);
28 
30  PstString(PstString&& string) noexcept;
31 
33  ~PstString();
34 
36  const char* c_str() const;
37 
43  size_t length() const;
44 
50  size_t size() const;
51 
53  void resize(size_t size);
54 
62  int compare(const PstString& string) const;
63 
68  PstString& append(const PstString& string);
69 
71  void clear();
72 
74  bool empty() const;
75 
77  PstString& operator=(const PstString& string);
78 
80  PstString& operator=(PstString&& string) noexcept;
81 
86  bool operator==(const PstString& string) const;
87 
92  bool operator!=(const PstString& string) const;
93 
98  bool operator<(const PstString& string) const;
99 
104  bool operator<=(const PstString& string) const;
105 
110  bool operator>(const PstString& string) const;
111 
116  bool operator>=(const PstString& string) const;
117 
123  PstString& operator+=(const PstString& right);
124 
130  PST_EXPORT friend PstString operator+(PstString left, const PstString& right);
131 
132  private:
133  char* m_string;
134  size_t m_size;
135 
136  void copy_internal(const PstString& string);
137 
138  void move_internal(PstString&& string) noexcept;
139  };
140 }
141 }
PSTech::Utils::PstString::m_string
char * m_string
Definition: PstString.h:133
PstBase.h
PST_EXPORT
#define PST_EXPORT
Definition: PstBase.h:12
PSTech::Utils::PstString
Definition: PstString.h:17
PSTech::Utils::PstString::m_size
size_t m_size
Definition: PstString.h:134
PSTech
Definition: PstArray.h:10