Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <QtCore/qchar.h>
#include <QtCore/qcompare.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qstringliteral.h>
#include <QtCore/qstringalgorithms.h>
#include <string>
#include <string_view>
#include <QtCore/q20type_traits.h>
Go to the source code of this file.
Namespaces | |
namespace | QtPrivate |
\macro QT_NO_KEYWORDS > | |
Functions | |
Q_DECLARE_TYPEINFO (QStringView, Q_PRIMITIVE_TYPE) | |
template<typename QStringLike , typename std::enable_if< std::is_same< QStringLike, QString >::value, bool >::type = true> | |
QStringView | qToStringViewIgnoringNull (const QStringLike &s) noexcept |
Q_DECLARE_TYPEINFO | ( | QStringView | , |
Q_PRIMITIVE_TYPE | ) |
|
inlinenoexcept |
Convert s to a QStringView ignoring {s.isNull()}.
Returns a string view that references {s}' data, but is never null.
This is a faster way to convert a QString to a QStringView, if null QStrings can legitimately be treated as empty ones.
Definition at line 460 of file qstringview.h.
Referenced by QRegularExpression::anchoredPattern(), QCborContainerPrivate::append(), QString::arg(), QString::arg(), QCborMap::constFind(), QRegularExpression::escape(), QString::isLower(), QString::isUpper(), QCborMap::operator[](), QCborValue::operator[](), QCborValue::operator[](), qIsEffectiveTLD(), QtPrivate::qStringLikeToArg(), QString::remove(), QLoggingSettingsParser::setContent(), QLocale::toDouble(), QLocale::toFloat(), QString::toHtmlEscaped(), QLocale::toInt(), QString::tokenize(), QLocale::toLong(), QLocale::toLongLong(), QLocale::toShort(), QLocale::toString(), QLocale::toString(), QLocale::toString(), QLocale::toUInt(), QLocale::toULong(), QLocale::toULongLong(), QLocale::toUShort(), QString::toWCharArray(), and QRegularExpression::wildcardToRegularExpression().