21#ifndef CUTELEE_SAFESTRING_H
22#define CUTELEE_SAFESTRING_H
24#include "cutelee_templates_export.h"
26#include <QtCore/QString>
27#include <QtCore/QVariant>
136 void setNeedsEscape(
bool needsEscape);
142 bool needsEscape()
const;
153 void setSafety(Safety safety);
175#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 2)
179#ifndef QT_NO_CAST_FROM_ASCII
184 return *m_safeString;
191 return *m_safeString;
216#ifndef QT_NO_CAST_FROM_ASCII
221 return *m_safeString;
228 return *m_safeString;
305#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
350 operator QString()
const {
return m_nestedString; }
390 bool operator==(
const SafeString &other)
const;
397 bool operator==(
const QString &other)
const;
406 NestedString m_nestedString;
The NestedString is a QString whose methods always return a SafeString.
A QString wrapper class for containing whether a string is safe or needs to be escaped.
const NestedString & get() const
@ IsSafe
The string is safe and requires no further escaping.
The Cutelee namespace holds all public Cutelee API.
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QString & append(QChar ch)
QString & fill(QChar ch, int size)
QString & insert(int position, QChar ch)
QString left(int n) const const
QString leftJustified(int width, QChar fill, bool truncate) const const
QString mid(int position, int n) const const
QString normalized(NormalizationForm mode, QChar::UnicodeVersion version) const const
QString & prepend(QChar ch)
void push_front(QChar ch)
QString & remove(int position, int n)
QString repeated(int times) const const
QString & replace(int position, int n, QChar after)
QString right(int n) const const
QString rightJustified(int width, QChar fill, bool truncate) const const
QString section(QChar sep, int start, int end, SectionFlags flags) const const
QString & setNum(short n, int base)
QString & setUnicode(const QChar *unicode, int size)
QString & setUtf16(const ushort *unicode, int size)
QString simplified() const const
QString toLower() const const
QString toUpper() const const
QString trimmed() const const
void truncate(int position)
const QChar * unicode() const const
QVariant fromValue(const T &value)