![]() |
Qt 6.x
The Qt SDK
|
#include <QtCore/qlatin1stringview.h>
#include <QtCore/qstringview.h>
#include <QtCore/qutf8stringview.h>
#include <QtCore/q20type_traits.h>
#include <limits>
Go to the source code of this file.
Classes | |
struct | QtPrivate::wrapped< Tag, Result > |
class | QAnyStringView |
\inmodule QtCore More... | |
Namespaces | |
namespace | QtPrivate |
\macro QT_NAMESPACE | |
Typedefs | |
template<typename Tag , typename Result > | |
using | QtPrivate::wrapped_t = typename wrapped< Tag, Result >::type |
Functions | |
Q_DECLARE_TYPEINFO (QAnyStringView, Q_PRIMITIVE_TYPE) | |
template<typename QStringLike , std::enable_if_t< std::disjunction_v< std::is_same< QStringLike, QString >, std::is_same< QStringLike, QByteArray > >, bool > = true> | |
QAnyStringView | qToAnyStringViewIgnoringNull (const QStringLike &s) noexcept |
Q_DECLARE_TYPEINFO | ( | QAnyStringView | , |
Q_PRIMITIVE_TYPE | |||
) |
|
inlinenoexcept |
Convert s to a QAnyStringView ignoring {s.isNull()}.
Returns a string view that references {s}'s data, but is never null.
This is a faster way to convert a QString or QByteArray to a QAnyStringView, if null QStrings or QByteArrays can legitimately be treated as empty ones.
Definition at line 353 of file qanystringview.h.