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

(c8df9ff75bf7c6f560f3dbe613090d29cdf87966)

#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 2630 of file qstringconverter.cpp.

◆ fromLatin1Len()

qsizetype fromLatin1Len ( qsizetype l)
static

Definition at line 1954 of file qstringconverter.cpp.

◆ fromLocal8Bit()

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

Definition at line 1928 of file qstringconverter.cpp.

◆ fromUtf16()

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

Definition at line 1845 of file qstringconverter.cpp.

◆ fromUtf16BE()

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

Definition at line 1855 of file qstringconverter.cpp.

◆ fromUtf16LE()

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

Definition at line 1865 of file qstringconverter.cpp.

◆ fromUtf16Len()

qsizetype fromUtf16Len ( qsizetype l)
static

Definition at line 1947 of file qstringconverter.cpp.

◆ fromUtf32()

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

Definition at line 1875 of file qstringconverter.cpp.

◆ fromUtf32BE()

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

Definition at line 1885 of file qstringconverter.cpp.

◆ fromUtf32LE()

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

Definition at line 1895 of file qstringconverter.cpp.

◆ fromUtf32Len()

qsizetype fromUtf32Len ( qsizetype l)
static

Definition at line 1950 of file qstringconverter.cpp.

◆ fromUtf8Len()

qsizetype fromUtf8Len ( qsizetype l)
static

Definition at line 1943 of file qstringconverter.cpp.

◆ nameMatch()

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

Definition at line 2131 of file qstringconverter.cpp.

◆ nameMatch_impl() [1/3]

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

Definition at line 2116 of file qstringconverter.cpp.

◆ nameMatch_impl() [2/3]

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

Definition at line 2126 of file qstringconverter.cpp.

◆ nameMatch_impl() [3/3]

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

Definition at line 2121 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 2100 of file qstringconverter.cpp.

◆ parseHtmlMetaForEncoding()

QByteArray parseHtmlMetaForEncoding ( QByteArrayView data)
static

Definition at line 2571 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 1955 of file qstringconverter.cpp.

◆ toLocal8Bit()

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

Definition at line 1935 of file qstringconverter.cpp.

◆ toUtf16()

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

Definition at line 1850 of file qstringconverter.cpp.

◆ toUtf16BE()

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

Definition at line 1860 of file qstringconverter.cpp.

◆ toUtf16LE()

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

Definition at line 1870 of file qstringconverter.cpp.

◆ toUtf16Len()

qsizetype toUtf16Len ( qsizetype l)
static

Definition at line 1948 of file qstringconverter.cpp.

◆ toUtf32()

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

Definition at line 1880 of file qstringconverter.cpp.

◆ toUtf32BE()

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

Definition at line 1890 of file qstringconverter.cpp.

◆ toUtf32LE()

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

Definition at line 1900 of file qstringconverter.cpp.

◆ toUtf32Len()

qsizetype toUtf32Len ( qsizetype l)
static

Definition at line 1951 of file qstringconverter.cpp.

◆ toUtf8Len()

qsizetype toUtf8Len ( qsizetype l)
static

Definition at line 1944 of file qstringconverter.cpp.

Variable Documentation

◆ utf8bom

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

Definition at line 66 of file qstringconverter.cpp.