C
QSafeString Class
class SafeRenderer::QSafeStringThe QSafeString class contains functions for the string manipulation. More...
Header: | #include <QSafeString> |
Since: | QtSafeRenderer 1.2 |
This class was introduced in QtSafeRenderer 1.2.
Public Types
enum | StringExceptions { TooLong } |
Public Functions
QSafeString() | |
QSafeString(const SafeRenderer::qchar *const strArg) | |
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 |
Member Type Documentation
enum QSafeString::StringExceptions
This enum describes the thrown exceptions of QSafeString class.
Constant | Value | Description |
---|---|---|
SafeRenderer::QSafeString::TooLong | 0 | The string does not fit inside SafeRenderer::Constraints::MAX_LEN_OF_TEXT. |
Member Function Documentation
QSafeString::QSafeString()
Constructs empty QSafeString.
QSafeString::QSafeString(const SafeRenderer::qchar *const strArg)
Constructs QSafeString from the null terminated strArg. strArg is copied to QSafeString.
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:
Constant | Description |
---|---|
SafeRenderer::QSafeString::StringExceptions::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:
Constant | Description |
---|---|
SafeRenderer::QSafeString::StringExceptions::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:
Constant | Description |
---|---|
SafeRenderer::QSafeString::StringExceptions::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.
Available under certain Qt licenses.
Find out more.