diff options
Diffstat (limited to 'src/corelib/text/qstring.cpp')
-rw-r--r-- | src/corelib/text/qstring.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 644078f779..a350401b30 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -10984,6 +10984,31 @@ QString QString::toHtmlEscaped() const */ /*! + \fn Qt::Literals::StringLiterals::operator""_s(const char16_t *str, size_t size) + + \relates QString + \since 6.4 + + Literal operator that creates a QString out of the first \a size characters in + the char16_t string literal \a str. + + The QString is created at compile time, and the generated string data is stored + in the read-only segment of the compiled object file. Duplicate literals may + share the same read-only memory. This functionality is interchangeable with + QStringLiteral, but saves typing when many string literals are present in the + code. + + The following code creates a QString: + \code + using namespace Qt::Literals::StringLiterals; + + auto str = u"hello"_s; + \endcode + + \sa Qt::Literals::StringLiterals +*/ + +/*! \fn Qt::Literals::StringLiterals::operator""_L1(const char *str, size_t size) \relates QLatin1StringView |