Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qstringconverter.cpp File Reference

(23ec36d1b23a866771ada3a6f2cd47217fecad2c)

#include <qstringconverter.h>
#include <private/qstringconverter_p.h>
#include "qendian.h"
#include "private/qsimd_p.h"
#include "private/qstringiterator_p.h"
#include "private/qtools_p.h"
#include "qbytearraymatcher.h"
#include "qcontainertools_impl.h"
#include <QtCore/qbytearraylist.h>
#include <array>
#include <string>
#include <QtCore/q20utility.h>
#include <QtCore/q26numeric.h>
Include dependency graph for qstringconverter.cpp:

Go to the source code of this file.

Classes

struct  QUtf8NoOutputTraits
struct  QUtf8NoOutputTraits::NoOutput

Namespaces

namespace  QtPrivate

Enumerations

enum  { Endian = 0 , Data = 1 , Endian = 0 , Data = 1 }
enum  { HeaderDone = 1 , HeaderDone = 1 }
enum  { Endian = 0 , Data = 1 , Endian = 0 , Data = 1 }
enum  { HeaderDone = 1 , HeaderDone = 1 }

Functions

static bool simdEncodeAscii (uchar *, const char16_t *, const char16_t *, const char16_t *)
static bool simdDecodeAscii (char16_t *, const uchar *, const uchar *, const uchar *)
static const ucharsimdFindNonAscii (const uchar *src, const uchar *end, const uchar *&nextAscii)
static void simdCompareAscii (const qchar8_t *&, const qchar8_t *, const char16_t *&, const char16_t *)
static QCharfromUtf16 (QChar *out, QByteArrayView in, QStringConverter::State *state)
static char * toUtf16 (char *out, QStringView in, QStringConverter::State *state)
static QCharfromUtf16BE (QChar *out, QByteArrayView in, QStringConverter::State *state)
static char * toUtf16BE (char *out, QStringView in, QStringConverter::State *state)
static QCharfromUtf16LE (QChar *out, QByteArrayView in, QStringConverter::State *state)
static char * toUtf16LE (char *out, QStringView in, QStringConverter::State *state)
static QCharfromUtf32 (QChar *out, QByteArrayView in, QStringConverter::State *state)
static char * toUtf32 (char *out, QStringView in, QStringConverter::State *state)
static QCharfromUtf32BE (QChar *out, QByteArrayView in, QStringConverter::State *state)
static char * toUtf32BE (char *out, QStringView in, QStringConverter::State *state)
static QCharfromUtf32LE (QChar *out, QByteArrayView in, QStringConverter::State *state)
static char * toUtf32LE (char *out, QStringView in, QStringConverter::State *state)
static QCharfromLocal8Bit (QChar *out, QByteArrayView in, QStringConverter::State *state)
static char * toLocal8Bit (char *out, QStringView in, QStringConverter::State *state)
static qsizetype fromUtf8Len (qsizetype l)
static qsizetype toUtf8Len (qsizetype l)
static qsizetype fromUtf16Len (qsizetype l)
static qsizetype toUtf16Len (qsizetype l)
static qsizetype fromUtf32Len (qsizetype l)
static qsizetype toUtf32Len (qsizetype l)
static qsizetype fromLatin1Len (qsizetype l)
static qsizetype toLatin1Len (qsizetype l)
template<typename Char>
static bool nameMatch_impl_impl (const char *a, const Char *b, const Char *b_end)
static bool nameMatch_impl (const char *a, QLatin1StringView b)
static bool nameMatch_impl (const char *a, QUtf8StringView b)
static bool nameMatch_impl (const char *a, QStringView b)
static bool nameMatch (const char *a, QAnyStringView b)
static int QtPrivate::partiallyParsedDataCount (QStringConverter::State *state)
static QByteArray parseHtmlMetaForEncoding (QByteArrayView data)
static qsizetype availableCodecCount ()

Variables

static const uchar utf8bom [] = { 0xef, 0xbb, 0xbf }

Enumeration Type Documentation

◆ anonymous enum [1/2]

anonymous enum
Enumerator
Endian 
Data 
Endian 
Data 

Definition at line 64 of file qstringconverter.cpp.

◆ anonymous enum [2/2]

anonymous enum
Enumerator
Endian 
Data 
Endian 
Data 

Definition at line 64 of file qstringconverter.cpp.

◆ anonymous enum [1/2]

anonymous enum
Enumerator
HeaderDone 
HeaderDone 

Definition at line 680 of file qstringconverter.cpp.

◆ anonymous enum [2/2]

anonymous enum
Enumerator
HeaderDone 
HeaderDone 

Definition at line 680 of file qstringconverter.cpp.

Function Documentation

◆ availableCodecCount()

qsizetype availableCodecCount ( )
static

Definition at line 2624 of file qstringconverter.cpp.

◆ fromLatin1Len()

qsizetype fromLatin1Len ( qsizetype l)
static

Definition at line 1948 of file qstringconverter.cpp.

◆ fromLocal8Bit()

QChar * fromLocal8Bit ( QChar * out,
QByteArrayView in,
QStringConverter::State * state )
static

Definition at line 1922 of file qstringconverter.cpp.

◆ fromUtf16()

QChar * fromUtf16 ( QChar * out,
QByteArrayView in,
QStringConverter::State * state )
static

Definition at line 1839 of file qstringconverter.cpp.

◆ fromUtf16BE()

QChar * fromUtf16BE ( QChar * out,
QByteArrayView in,
QStringConverter::State * state )
static

Definition at line 1849 of file qstringconverter.cpp.

◆ fromUtf16LE()

QChar * fromUtf16LE ( QChar * out,
QByteArrayView in,
QStringConverter::State * state )
static

Definition at line 1859 of file qstringconverter.cpp.

◆ fromUtf16Len()

qsizetype fromUtf16Len ( qsizetype l)
static

Definition at line 1941 of file qstringconverter.cpp.

◆ fromUtf32()

QChar * fromUtf32 ( QChar * out,
QByteArrayView in,
QStringConverter::State * state )
static

Definition at line 1869 of file qstringconverter.cpp.

◆ fromUtf32BE()

QChar * fromUtf32BE ( QChar * out,
QByteArrayView in,
QStringConverter::State * state )
static

Definition at line 1879 of file qstringconverter.cpp.

◆ fromUtf32LE()

QChar * fromUtf32LE ( QChar * out,
QByteArrayView in,
QStringConverter::State * state )
static

Definition at line 1889 of file qstringconverter.cpp.

◆ fromUtf32Len()

qsizetype fromUtf32Len ( qsizetype l)
static

Definition at line 1944 of file qstringconverter.cpp.

◆ fromUtf8Len()

qsizetype fromUtf8Len ( qsizetype l)
static

Definition at line 1937 of file qstringconverter.cpp.

◆ nameMatch()

bool nameMatch ( const char * a,
QAnyStringView b )
static

Definition at line 2125 of file qstringconverter.cpp.

◆ nameMatch_impl() [1/3]

bool nameMatch_impl ( const char * a,
QLatin1StringView b )
static

Definition at line 2110 of file qstringconverter.cpp.

◆ nameMatch_impl() [2/3]

bool nameMatch_impl ( const char * a,
QStringView b )
static

Definition at line 2120 of file qstringconverter.cpp.

◆ nameMatch_impl() [3/3]

bool nameMatch_impl ( const char * a,
QUtf8StringView b )
static

Definition at line 2115 of file qstringconverter.cpp.

◆ nameMatch_impl_impl()

template<typename Char>
bool nameMatch_impl_impl ( const char * a,
const Char * b,
const Char * b_end )
static

Definition at line 2094 of file qstringconverter.cpp.

◆ parseHtmlMetaForEncoding()

QByteArray parseHtmlMetaForEncoding ( QByteArrayView data)
static

Definition at line 2565 of file qstringconverter.cpp.

◆ simdCompareAscii()

void simdCompareAscii ( const qchar8_t *& ,
const qchar8_t * ,
const char16_t *& ,
const char16_t *  )
static

Definition at line 675 of file qstringconverter.cpp.

◆ simdDecodeAscii()

bool simdDecodeAscii ( char16_t * ,
const uchar * ,
const uchar * ,
const uchar *  )
inlinestatic

Definition at line 664 of file qstringconverter.cpp.

◆ simdEncodeAscii()

bool simdEncodeAscii ( uchar * ,
const char16_t * ,
const char16_t * ,
const char16_t *  )
inlinestatic

Definition at line 659 of file qstringconverter.cpp.

◆ simdFindNonAscii()

const uchar * simdFindNonAscii ( const uchar * src,
const uchar * end,
const uchar *& nextAscii )
inlinestatic

Definition at line 669 of file qstringconverter.cpp.

◆ toLatin1Len()

qsizetype toLatin1Len ( qsizetype l)
static

Definition at line 1949 of file qstringconverter.cpp.

◆ toLocal8Bit()

char * toLocal8Bit ( char * out,
QStringView in,
QStringConverter::State * state )
static

Definition at line 1929 of file qstringconverter.cpp.

◆ toUtf16()

char * toUtf16 ( char * out,
QStringView in,
QStringConverter::State * state )
static

Definition at line 1844 of file qstringconverter.cpp.

◆ toUtf16BE()

char * toUtf16BE ( char * out,
QStringView in,
QStringConverter::State * state )
static

Definition at line 1854 of file qstringconverter.cpp.

◆ toUtf16LE()

char * toUtf16LE ( char * out,
QStringView in,
QStringConverter::State * state )
static

Definition at line 1864 of file qstringconverter.cpp.

◆ toUtf16Len()

qsizetype toUtf16Len ( qsizetype l)
static

Definition at line 1942 of file qstringconverter.cpp.

◆ toUtf32()

char * toUtf32 ( char * out,
QStringView in,
QStringConverter::State * state )
static

Definition at line 1874 of file qstringconverter.cpp.

◆ toUtf32BE()

char * toUtf32BE ( char * out,
QStringView in,
QStringConverter::State * state )
static

Definition at line 1884 of file qstringconverter.cpp.

◆ toUtf32LE()

char * toUtf32LE ( char * out,
QStringView in,
QStringConverter::State * state )
static

Definition at line 1894 of file qstringconverter.cpp.

◆ toUtf32Len()

qsizetype toUtf32Len ( qsizetype l)
static

Definition at line 1945 of file qstringconverter.cpp.

◆ toUtf8Len()

qsizetype toUtf8Len ( qsizetype l)
static

Definition at line 1938 of file qstringconverter.cpp.

Variable Documentation

◆ utf8bom

const uchar utf8bom = { 0xef, 0xbb, 0xbf }
static

Definition at line 66 of file qstringconverter.cpp.