Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qstring.cpp File Reference
#include "qstringlist.h"
#include "qunicodetables_p.h"
#include <private/qstringconverter_p.h>
#include <private/qtools_p.h>
#include "qlocale_tools_p.h"
#include "private/qsimd_p.h"
#include <qnumeric.h>
#include <qdatastream.h>
#include <qlist.h>
#include "qlocale.h"
#include "qlocale_p.h"
#include "qstringbuilder.h"
#include "qstringmatcher.h"
#include "qvarlengtharray.h"
#include "qdebug.h"
#include "qendian.h"
#include "qcollator.h"
#include "qttypetraits.h"
#include <private/qfunctions_p.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <wchar.h>
#include "qchar.cpp"
#include "qlatin1stringmatcher.h"
#include "qstringmatcher.cpp"
#include "qstringiterator_p.h"
#include "qstringalgorithms_p.h"
#include "qthreadstorage.h"
#include <algorithm>
#include <functional>
+ Include dependency graph for qstring.cpp:

Go to the source code of this file.

Classes

struct  ArgEscapeData
 

Namespaces

namespace  QUnicodeTables
 

Macros

#define LLONG_MAX   qint64_C(9223372036854775807)
 
#define LLONG_MIN   (-LLONG_MAX - qint64_C(1))
 
#define ULLONG_MAX   quint64_C(18446744073709551615)
 
#define REHASH(a)
 
#define ATTRIBUTE_NO_SANITIZE
 
#define CSTR_LESS_THAN   1
 
#define CSTR_EQUAL   2
 
#define CSTR_GREATER_THAN   3
 

Typedefs

using CaseInsensitiveL1 = QtPrivate::QCaseInsensitiveLatin1Hash
 

Enumerations

enum  LengthMod {
  lm_none , lm_hh , lm_h , lm_l ,
  lm_ll , lm_L , lm_j , lm_z ,
  lm_t
}
 

Functions

qsizetype qFindStringBoyerMoore (QStringView haystack, qsizetype from, QStringView needle, Qt::CaseSensitivity cs)
 
bool qt_is_ascii (const char *&ptr, const char *end) noexcept
 
static bool isAscii_helper (const char16_t *&ptr, const char16_t *end)
 
Q_CORE_EXPORT void qt_from_latin1 (char16_t *dst, const char *str, size_t size) noexcept
 
static QVarLengthArray< char16_t > qt_from_latin1_to_qvla (QLatin1StringView str)
 
template<bool Checked>
static void qt_to_latin1_internal (uchar *dst, const char16_t *src, qsizetype length)
 
void qt_to_latin1 (uchar *dst, const char16_t *src, qsizetype length)
 
void qt_to_latin1_unchecked (uchar *dst, const char16_t *src, qsizetype length)
 
static Q_NEVER_INLINE int ucstricmp (qsizetype alen, const char16_t *a, qsizetype blen, const char16_t *b)
 
static Q_NEVER_INLINE int ucstricmp (qsizetype alen, const char16_t *a, qsizetype blen, const char *b)
 
static Q_NEVER_INLINE int ucstricmp8 (const char *utf8, const char *utf8end, const QChar *utf16, const QChar *utf16end)
 
template<StringComparisonMode Mode>
static int ucstrncmp (const char16_t *a, const char16_t *b, size_t l)
 
template<StringComparisonMode Mode>
static int ucstrncmp (const char16_t *a, const char *b, size_t l)
 
template<typename Char2 >
static bool ucstreq (const char16_t *a, size_t alen, const Char2 *b, size_t blen)
 
template<typename Char2 >
static int ucstrcmp (const char16_t *a, size_t alen, const Char2 *b, size_t blen)
 
static int latin1nicmp (const char *lhsChar, qsizetype lSize, const char *rhsChar, qsizetype rSize)
 
static int qArgDigitValue (QChar ch) noexcept
 
static bool needsReallocate (const QString &str, qsizetype newSize)
 
template<typename T >
static void insert_helper (QString &str, qsizetype i, const T &toInsert)
 
template<typename T >
static void removeStringImpl (QString &s, const T &needle, Qt::CaseSensitivity cs)
 
static void replace_with_copy (QString &str, size_t *indices, qsizetype nIndices, qsizetype blen, QStringView after)
 
static void replace_in_place (QString &str, size_t *indices, qsizetype nIndices, qsizetype blen, QStringView after)
 
static void replace_helper (QString &str, size_t *indices, qsizetype nIndices, qsizetype blen, QStringView after)
 
static QByteArray qt_convert_to_latin1 (QStringView string)
 
static QByteArray qt_convert_to_local_8bit (QStringView string)
 
static QByteArray qt_convert_to_utf8 (QStringView str)
 
static QList< uintqt_convert_to_ucs4 (QStringView string)
 
template<typename T >
static Q_NEVER_INLINE QString QUnicodeTables::detachAndConvertCase (T &str, QStringIterator it, QUnicodeTables::Case which)
 
template<typename T >
static QString QUnicodeTables::convertCase (T &str, QUnicodeTables::Case which)
 
static void append_utf8 (QString &qs, const char *cs, qsizetype len)
 
static uint parse_flag_characters (const char *&c) noexcept
 
static int parse_field_width (const char *&c, qsizetype size)
 
static bool can_consume (const char *&c, char ch) noexcept
 
static LengthMod parse_length_modifier (const char *&c) noexcept
 
template<typename Int >
static Int toIntegral (QStringView string, bool *ok, int base)
 
void qt_string_normalize (QString *data, QString::NormalizationForm mode, QChar::UnicodeVersion version, qsizetype from)
 
static ArgEscapeData findArgEscapes (QStringView s)
 
static QString replaceArgEscapes (QStringView s, const ArgEscapeData &d, qsizetype field_width, QStringView arg, QStringView larg, QChar fillChar)
 
static char16_t to_unicode (const QChar c)
 
static char16_t to_unicode (const char c)
 
template<typename Char >
static int getEscape (const Char *uc, qsizetype *pos, qsizetype len, int maxNumber=999)
 
 Q_DECLARE_TYPEINFO (Part, Q_PRIMITIVE_TYPE)
 
Q_ALWAYS_INLINE QString to_string (QLatin1StringView s) noexcept
 
Q_ALWAYS_INLINE QString to_string (QStringView s) noexcept
 
template<typename StringView >
static QString argToQStringImpl (StringView pattern, size_t numArgs, const QtPrivate::ArgBase **args)
 
QDataStreamoperator<< (QDataStream &out, const QString &str)
 
QDataStreamoperator>> (QDataStream &in, QString &str)
 

Macro Definition Documentation

◆ ATTRIBUTE_NO_SANITIZE

#define ATTRIBUTE_NO_SANITIZE

Definition at line 395 of file qstring.cpp.

◆ CSTR_EQUAL

#define CSTR_EQUAL   2

Definition at line 6630 of file qstring.cpp.

◆ CSTR_GREATER_THAN

#define CSTR_GREATER_THAN   3

Definition at line 6631 of file qstring.cpp.

◆ CSTR_LESS_THAN

#define CSTR_LESS_THAN   1

Definition at line 6629 of file qstring.cpp.

◆ LLONG_MAX

#define LLONG_MAX   qint64_C(9223372036854775807)

Definition at line 60 of file qstring.cpp.

◆ LLONG_MIN

#define LLONG_MIN   (-LLONG_MAX - qint64_C(1))

Definition at line 63 of file qstring.cpp.

◆ REHASH

#define REHASH (   a)
Value:
if (sl_minus_1 < sizeof(std::size_t) * CHAR_BIT) \
hashHaystack -= std::size_t(a) << sl_minus_1; \
hashHaystack <<= 1
GLboolean GLboolean GLboolean GLboolean a
[7]

Definition at line 69 of file qstring.cpp.

◆ ULLONG_MAX

#define ULLONG_MAX   quint64_C(18446744073709551615)

Definition at line 66 of file qstring.cpp.

Typedef Documentation

◆ CaseInsensitiveL1

Enumeration Type Documentation

◆ LengthMod

enum LengthMod
Enumerator
lm_none 
lm_hh 
lm_h 
lm_l 
lm_ll 
lm_L 
lm_j 
lm_z 
lm_t 

Definition at line 7059 of file qstring.cpp.

Function Documentation

◆ append_utf8()

static void append_utf8 ( QString qs,
const char *  cs,
qsizetype  len 
)
static

Definition at line 7014 of file qstring.cpp.

References QString::constData(), QUtf8::convertToUnicode(), QString::data(), QString::resize(), and QString::size().

Referenced by QString::vasprintf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ argToQStringImpl()

template<typename StringView >
static QString argToQStringImpl ( StringView  pattern,
size_t  numArgs,
const QtPrivate::ArgBase **  args 
)
static

Definition at line 8989 of file qstring.cpp.

References args, QtPrivate::ArgBase::L1, out, Q_UNLIKELY, qt_from_latin1(), qUtf16Printable, qWarning, to_string(), QtPrivate::ArgBase::U16, QtPrivate::ArgBase::U8, and Qt::Uninitialized.

Referenced by QtPrivate::argToQString(), and QtPrivate::argToQString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ can_consume()

static bool can_consume ( const char *&  c,
char  ch 
)
inlinestaticnoexcept

Definition at line 7061 of file qstring.cpp.

References ch.

Referenced by parse_length_modifier().

+ Here is the caller graph for this function:

◆ findArgEscapes()

static ArgEscapeData findArgEscapes ( QStringView  s)
static

Definition at line 8257 of file qstring.cpp.

References d, escape(), qArgDigitValue(), and QChar::unicode().

Referenced by QString::arg(), QString::arg(), QString::arg(), and QString::arg().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEscape()

template<typename Char >
static int getEscape ( const Char uc,
qsizetype pos,
qsizetype  len,
int  maxNumber = 999 
)
static

Definition at line 8820 of file qstring.cpp.

References escape(), i, pos, and to_unicode().

+ Here is the call graph for this function:

◆ insert_helper()

template<typename T >
static void insert_helper ( QString str,
qsizetype  i,
const T &  toInsert 
)
static

T is a view or a container on/of QChar, char16_t, or char

Definition at line 2947 of file qstring.cpp.

References begin(), QString::cbegin(), QString::cend(), QString::data_ptr(), QArrayData::GrowsAtBeginning, QArrayData::GrowsAtEnd, i, needsReallocate(), other(), Q_CHECK_PTR(), Q_UNLIKELY, qt_from_latin1(), QString::resize(), str, and QString::swap().

Referenced by QString::insert(), QString::insert(), and QString::insert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAscii_helper()

static bool isAscii_helper ( const char16_t *&  ptr,
const char16_t *  end 
)
static

Definition at line 868 of file qstring.cpp.

References ok, and ptr().

Referenced by QtPrivate::isAscii(), and qt_string_normalize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ latin1nicmp()

static int latin1nicmp ( const char *  lhsChar,
qsizetype  lSize,
const char *  rhsChar,
qsizetype  rSize 
)
static

Definition at line 1387 of file qstring.cpp.

References QtPrivate::QCaseInsensitiveLatin1Hash::difference(), i, Q_ASSERT, and QtMiscUtils::qt_lencmp().

Referenced by QStringView::compareStrings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ needsReallocate()

static bool needsReallocate ( const QString str,
qsizetype  newSize 
)
static

Definition at line 2617 of file qstring.cpp.

References QString::capacity(), QString::data_ptr(), QArrayDataPointer< T >::freeSpaceAtBegin(), and str.

Referenced by QString::insert(), insert_helper(), replace_helper(), and QString::resize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator<<()

QDataStream & operator<< ( QDataStream out,
const QString str 
)
related

Definition at line 9318 of file qstring.cpp.

◆ operator>>()

QDataStream & operator>> ( QDataStream in,
QString str 
)
related

Definition at line 9350 of file qstring.cpp.

◆ parse_field_width()

static int parse_field_width ( const char *&  c,
qsizetype  size 
)
static

Definition at line 7042 of file qstring.cpp.

References QtMiscUtils::isAsciiDigit(), Q_ASSERT, and qstrntoull().

Referenced by QString::vasprintf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_flag_characters()

static uint parse_flag_characters ( const char *&  c)
staticnoexcept

Definition at line 7022 of file qstring.cpp.

References QLocaleData::AddTrailingZeroes, QLocaleData::AlwaysShowSign, QLocaleData::BlankBeforePositive, QLocaleData::ForcePoint, QLocaleData::GroupDigits, QLocaleData::LeftAdjusted, QLocaleData::ShowBase, QLocaleData::ZeroPadded, and QLocaleData::ZeroPadExponent.

Referenced by QString::vasprintf().

+ Here is the caller graph for this function:

◆ parse_length_modifier()

static LengthMod parse_length_modifier ( const char *&  c)
staticnoexcept

Definition at line 7070 of file qstring.cpp.

References can_consume(), lm_h, lm_hh, lm_j, lm_l, lm_L, lm_ll, lm_none, lm_t, and lm_z.

Referenced by QString::vasprintf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Q_DECLARE_TYPEINFO()

Q_DECLARE_TYPEINFO ( Part  ,
Q_PRIMITIVE_TYPE   
)

◆ qArgDigitValue()

static int qArgDigitValue ( QChar  ch)
staticnoexcept

Definition at line 1633 of file qstring.cpp.

References ch.

Referenced by findArgEscapes(), and replaceArgEscapes().

+ Here is the caller graph for this function:

◆ qFindStringBoyerMoore()

qsizetype qFindStringBoyerMoore ( QStringView  haystack,
qsizetype  haystackOffset,
QStringView  needle,
Qt::CaseSensitivity  cs 
)

Definition at line 313 of file qstringmatcher.cpp.

References bm_find(), and bm_init_skiptable().

Referenced by QtPrivate::findString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_convert_to_latin1()

static Q_NEVER_INLINE QByteArray qt_convert_to_latin1 ( QStringView  string)
static

Definition at line 5482 of file qstring.cpp.

References ba, QByteArray::constData(), Q_UNLIKELY, qt_to_latin1(), and Qt::Uninitialized.

Referenced by QStringView::convertToLatin1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_convert_to_local_8bit()

static QByteArray qt_convert_to_local_8bit ( QStringView  string)
static

Definition at line 5574 of file qstring.cpp.

References fromUtf16, QStringConverterBase::Stateless, and QStringConverter::System.

Referenced by QStringView::convertToLocal8Bit().

+ Here is the caller graph for this function:

◆ qt_convert_to_ucs4()

static QList< uint > qt_convert_to_ucs4 ( QStringView  string)
static

Definition at line 5667 of file qstring.cpp.

References it.

Referenced by QStringView::convertToUcs4(), and QString::toUcs4().

+ Here is the caller graph for this function:

◆ qt_convert_to_utf8()

static QByteArray qt_convert_to_utf8 ( QStringView  str)
static

Definition at line 5620 of file qstring.cpp.

References QUtf8::convertFromUnicode(), QString::isNull(), and str.

Referenced by QStringView::convertToUtf8().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_from_latin1()

Q_CORE_EXPORT void qt_from_latin1 ( char16_t *  dst,
const char *  str,
size_t  size 
)
noexcept

Definition at line 930 of file qstring.cpp.

References e, i, and str.

Referenced by QAbstractConcatenable::appendLatin1To(), argToQStringImpl(), QLatin1::convertToUnicode(), QString::fromLatin1(), insert_helper(), QString::operator=(), and qt_from_latin1_to_qvla().

+ Here is the caller graph for this function:

◆ qt_from_latin1_to_qvla()

static QVarLengthArray< char16_t > qt_from_latin1_to_qvla ( QLatin1StringView  str)
static

Definition at line 1005 of file qstring.cpp.

References QString::data(), QVarLengthArray< T, Prealloc >::data(), qt_from_latin1(), QString::size(), and str.

Referenced by QString::arg(), QtPrivate::count(), QtPrivate::findString(), QString::replace(), QString::replace(), QString::replace(), and QString::replace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_is_ascii()

bool qt_is_ascii ( const char *&  ptr,
const char *  end 
)
noexcept

Definition at line 796 of file qstring.cpp.

References QSysInfo::BigEndian, QSysInfo::ByteOrder, ptr(), qCountLeadingZeroBits(), and qCountTrailingZeroBits().

Referenced by QtPrivate::isAscii().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_string_normalize()

void qt_string_normalize ( QString data,
QString::NormalizationForm  mode,
QChar::UnicodeVersion  version,
qsizetype  from 
)

Definition at line 8147 of file qstring.cpp.

References canonicalOrderHelper(), composeHelper(), QChar::currentUnicodeVersion(), d, decomposeHelper(), QChar::highSurrogate(), isAscii_helper(), QChar::lowSurrogate(), QUnicodeTables::NormalizationCorrectionsVersionMax, QString::NormalizationForm_D, QString::NormalizationForm_KD, normalizationQuickCheckHelper(), pos, QChar::requiresSurrogates(), QUnicodeTables::uc_normalization_corrections, and QChar::Unicode_Unassigned.

Referenced by QString::normalized().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_to_latin1()

void qt_to_latin1 ( uchar dst,
const char16_t *  src,
qsizetype  length 
)

Definition at line 1193 of file qstring.cpp.

Referenced by QLatin1::convertFromUnicode(), from_string(), qt_convert_to_latin1(), QStringView::toDouble(), and toIntegral().

+ Here is the caller graph for this function:

◆ qt_to_latin1_internal()

template<bool Checked>
static void qt_to_latin1_internal ( uchar dst,
const char16_t *  src,
qsizetype  length 
)
static

Definition at line 1014 of file qstring.cpp.

References i, Q_UNUSED, and qToUnaligned().

+ Here is the call graph for this function:

◆ qt_to_latin1_unchecked()

void qt_to_latin1_unchecked ( uchar dst,
const char16_t *  src,
qsizetype  length 
)

Definition at line 1198 of file qstring.cpp.

Referenced by QCborContainerPrivate::appendAsciiString(), QtPrivate::count(), and QtPrivate::findString().

+ Here is the caller graph for this function:

◆ removeStringImpl()

template<typename T >
static void removeStringImpl ( QString s,
const T &  needle,
Qt::CaseSensitivity  cs 
)
static

Definition at line 3464 of file qstring.cpp.

References QArrayDataPointer< T >::begin(), begin(), copy(), QArrayDataPointer< T >::end(), i, QArrayDataPointer< T >::needsDetach(), and Qt::Uninitialized.

Referenced by QString::remove(), and QString::remove().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replace_helper()

static void replace_helper ( QString str,
size_t *  indices,
qsizetype  nIndices,
qsizetype  blen,
QStringView  after 
)
static

Definition at line 3729 of file qstring.cpp.

References QStringView::begin(), QString::data_ptr(), QStringView::end(), QArrayDataPointer< T >::needsDetach(), needsReallocate(), QtPrivate::q_points_into_range(), replace_in_place(), replace_with_copy(), QStringView::size(), QArrayDataPointer< T >::size, and str.

Referenced by QString::replace(), QString::replace(), and QString::replace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replace_in_place()

static void replace_in_place ( QString str,
size_t *  indices,
qsizetype  nIndices,
qsizetype  blen,
QStringView  after 
)
static

Definition at line 3684 of file qstring.cpp.

References QArrayDataPointer< T >::begin(), begin(), QString::data_ptr(), QArrayDataPointer< T >::end(), i, QString::resize(), QStringView::size(), QArrayDataPointer< T >::size, str, and QStringView::utf16().

Referenced by replace_helper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replace_with_copy()

static void replace_with_copy ( QString str,
size_t *  indices,
qsizetype  nIndices,
qsizetype  blen,
QStringView  after 
)
static

Instead of detaching, or reallocating if "before" is shorter than "after" and there isn't enough capacity, create a new string, copy characters to it as needed, then swap it with "str".

Definition at line 3661 of file qstring.cpp.

References QArrayDataPointer< T >::begin(), copy(), QString::data_ptr(), QArrayDataPointer< T >::end(), i, QStringView::size(), QArrayDataPointer< T >::size, str, QString::swap(), Qt::Uninitialized, and QStringView::utf16().

Referenced by replace_helper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replaceArgEscapes()

static QString replaceArgEscapes ( QStringView  s,
const ArgEscapeData d,
qsizetype  field_width,
QStringView  arg,
QStringView  larg,
QChar  fillChar 
)
static

Definition at line 8333 of file qstring.cpp.

References arg, d, QStringView::data(), escape(), Q_ASSERT, qAbs(), qArgDigitValue(), qMax(), QStringView::size(), QChar::unicode(), and Qt::Uninitialized.

Referenced by QString::arg(), QString::arg(), QString::arg(), and QString::arg().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ to_string() [1/2]

Q_ALWAYS_INLINE QString to_string ( QLatin1StringView  s)
noexcept

Definition at line 8985 of file qstring.cpp.

Referenced by argToQStringImpl().

+ Here is the caller graph for this function:

◆ to_string() [2/2]

Q_ALWAYS_INLINE QString to_string ( QStringView  s)
noexcept

Definition at line 8986 of file qstring.cpp.

◆ to_unicode() [1/2]

static char16_t to_unicode ( const char  c)
inlinestatic

Definition at line 8817 of file qstring.cpp.

References QLatin1Char::unicode().

+ Here is the call graph for this function:

◆ to_unicode() [2/2]

static char16_t to_unicode ( const QChar  c)
inlinestatic

Definition at line 8816 of file qstring.cpp.

Referenced by getEscape().

+ Here is the caller graph for this function:

◆ toIntegral()

template<typename Int >
static Int toIntegral ( QStringView  string,
bool *  ok,
int  base 
)
static

Definition at line 7380 of file qstring.cpp.

References base, QLocaleData::bytearrayToLongLong(), QLocaleData::bytearrayToUnsLongLong(), QVarLengthArray< T, Prealloc >::data(), ok, qt_to_latin1(), and qWarning.

+ Here is the call graph for this function:

◆ ucstrcmp()

template<typename Char2 >
static int ucstrcmp ( const char16_t *  a,
size_t  alen,
const Char2 *  b,
size_t  blen 
)
static

Definition at line 1374 of file qstring.cpp.

References qMin(), and QtMiscUtils::qt_lencmp().

Referenced by QStringView::compareStrings(), and QStringView::compareStrings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ucstreq()

template<typename Char2 >
static bool ucstreq ( const char16_t *  a,
size_t  alen,
const Char2 *  b,
size_t  blen 
)
static

Definition at line 1361 of file qstring.cpp.

Referenced by QtPrivate::equalStrings(), and QtPrivate::equalStrings().

+ Here is the caller graph for this function:

◆ ucstricmp() [1/2]

static Q_NEVER_INLINE int ucstricmp ( qsizetype  alen,
const char16_t *  a,
qsizetype  blen,
const char *  b 
)
static

Definition at line 1231 of file qstring.cpp.

References foldCase(), i, and qMin().

+ Here is the call graph for this function:

◆ ucstricmp() [2/2]

static Q_NEVER_INLINE int ucstricmp ( qsizetype  alen,
const char16_t *  a,
qsizetype  blen,
const char16_t *  b 
)
static

Definition at line 1204 of file qstring.cpp.

References foldCase(), i, qMin(), and QtMiscUtils::qt_lencmp().

Referenced by QStringView::compareStrings(), and QStringView::compareStrings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ucstricmp8()

static Q_NEVER_INLINE int ucstricmp8 ( const char *  utf8,
const char *  utf8end,
const QChar utf16,
const QChar utf16end 
)
static

Definition at line 1249 of file qstring.cpp.

References QStringIterator::hasNext(), QStringIterator::next(), output, QChar::ReplacementCharacter, and QChar::toCaseFolded().

Referenced by QStringView::compareStrings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ucstrncmp() [1/2]

template<StringComparisonMode Mode>
static int ucstrncmp ( const char16_t *  a,
const char *  b,
size_t  l 
)
static

Definition at line 1339 of file qstring.cpp.

References e.

◆ ucstrncmp() [2/2]

template<StringComparisonMode Mode>
static int ucstrncmp ( const char16_t *  a,
const char16_t *  b,
size_t  l 
)
static

Definition at line 1286 of file qstring.cpp.

References QSysInfo::BigEndian, QSysInfo::ByteOrder, db, i, and qCountTrailingZeroBits().

+ Here is the call graph for this function: