Loading...
Searching...
No Matches
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{
17 class PST_EXPORT PstString
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}
PstBase.h
PST_EXPORT
#define PST_EXPORT
Definition PstBase.h:12
PSTech::Utils::PstString::c_str
const char * c_str() const
PSTech::Utils::PstString::copy_internal
void copy_internal(const PstString &string)
PSTech::Utils::PstString::m_size
size_t m_size
Definition PstString.h:134
PSTech::Utils::PstString::size
size_t size() const
PSTech::Utils::PstString::~PstString
~PstString()
PSTech::Utils::PstString::m_string
char * m_string
Definition PstString.h:133
PSTech::Utils::PstString::empty
bool empty() const
PSTech::Utils::PstString::operator=
PstString & operator=(PstString &&string) noexcept
PSTech::Utils::PstString::operator!=
bool operator!=(const PstString &string) const
PSTech::Utils::PstString::PstString
PstString(const PstString &string)
PSTech::Utils::PstString::operator=
PstString & operator=(const PstString &string)
PSTech::Utils::PstString::length
size_t length() const
PSTech::Utils::PstString::PstString
PstString(PstString &&string) noexcept
PSTech::Utils::PstString::operator+
friend PstString operator+(PstString left, const PstString &right)
PSTech::Utils::PstString::move_internal
void move_internal(PstString &&string) noexcept
PSTech::Utils::PstString::PstString
PstString()
PSTech::Utils::PstString::clear
void clear()
PSTech::Utils::PstString::operator==
bool operator==(const PstString &string) const
PSTech::Utils
Definition PstArray.h:14
PSTech
Definition ExportedTypeConversions.h:9