C
QSafeString Class
class SafeRenderer::QSafeStringThe QSafeString class contains functions for the string manipulation. More...
Header: | #include <QSafeString> |
Since: | QtSafeRenderer 1.2 |
Public Functions
QSafeString(const SafeRenderer::qchar *const strArg) | |
QSafeString(const SafeRenderer::QSafeString &other) | |
QSafeString(SafeRenderer::QSafeString &&other) | |
void | append(const SafeRenderer::QSafeString &other) |
void | append(const SafeRenderer::qchar *const strArg) |
void | append(const SafeRenderer::qchar *const strArg, const size_t lengthArg) |
bool | endsWith(const SafeRenderer::qchar chrArg) const |
SafeRenderer::quint32 | hash() const |
const SafeRenderer::qchar * | rawCString() const |
SafeRenderer::QSafeString & | operator=(const SafeRenderer::QSafeString &other) & |
SafeRenderer::QSafeString & | operator=(const SafeRenderer::qchar *const strArg) & |
SafeRenderer::QSafeString & | operator=(SafeRenderer::QSafeString &&other) & |
Member Function Documentation
[explicit]
QSafeString::QSafeString(const SafeRenderer::qchar *const strArg)
Constructs QSafeString from the null terminated strArg. strArg is copied to QSafeString.
QSafeString::QSafeString(const SafeRenderer::QSafeString &other)
Constructs QSafeString from another QSafeString other. Data from other is copied to QSafeString.
QSafeString::QSafeString(SafeRenderer::QSafeString &&other)
Constructs QSafeString from another QSafeString other. Data from other is moved to this new instance.
void QSafeString::append(const SafeRenderer::QSafeString &other)
Appends the string other onto the end of this string. If the string does not fit to Constraints::MAX_LEN_OF_TEXT, an exception will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeStringException | SafeRenderer::QSafeStringException::StringException::TooLong | The string does not fit inside SafeRenderer::Constraints::MAX_LEN_OF_TEXT. |
void QSafeString::append(const SafeRenderer::qchar *const strArg)
Appends the string strArg onto the end of this string. In case of strArg does not fit to Constraints::MAX_LEN_OF_TEXT, an exception will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeStringException | SafeRenderer::QSafeStringException::StringException::TooLong | The string does not fit inside SafeRenderer::Constraints::MAX_LEN_OF_TEXT. |
void QSafeString::append(const SafeRenderer::qchar *const strArg, const size_t lengthArg)
Appends lengthArg amount of characters from the string strArg onto the end of this string. In case of strArg does not fit to Constraints::MAX_LEN_OF_TEXT, an exception will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeStringException | SafeRenderer::QSafeStringException::StringException::TooLong | The string does not fit inside SafeRenderer::Constraints::MAX_LEN_OF_TEXT. |
bool QSafeString::endsWith(const SafeRenderer::qchar chrArg) const
Returns true if the string ends with chrArg. Otherwise returns false.
SafeRenderer::quint32 QSafeString::hash() const
Calculates hash value from the string data.
const SafeRenderer::qchar *QSafeString::rawCString() const
Returns pointer to the string array.
SafeRenderer::QSafeString &QSafeString::operator=(const SafeRenderer::QSafeString &other) &
Copies contents of another QSafeString instance other to this one.
SafeRenderer::QSafeString &QSafeString::operator=(const SafeRenderer::qchar *const strArg) &
Copies contents of given null-terminated string strArg to this QSafeString instance.
SafeRenderer::QSafeString &QSafeString::operator=(SafeRenderer::QSafeString &&other) &
Copies contents of another temporary QSafeString instance other to this one.
Available under certain Qt licenses.
Find out more.