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

(92b5980a7e3e56020824679826d99d2ef8a0ac2b)

#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 dependency graph for qstringconverter.cpp:

Go to the source code of this file.

Classes

struct  QUtf8NoOutputTraits
 
struct  QUtf8NoOutputTraits::NoOutput
 

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

◆ anonymous enum [2/2]

anonymous enum
Enumerator
Endian 
Data 
Endian 
Data 

Definition at line 55 of file qstringconverter.cpp.

◆ anonymous enum [1/2]

anonymous enum
Enumerator
HeaderDone 
HeaderDone 

Definition at line 671 of file qstringconverter.cpp.

◆ anonymous enum [2/2]

anonymous enum
Enumerator
HeaderDone 
HeaderDone 

Definition at line 671 of file qstringconverter.cpp.

Function Documentation

◆ availableCodecCount()

static qsizetype availableCodecCount ( )
static

Definition at line 2615 of file qstringconverter.cpp.

◆ fromLatin1Len()

static qsizetype fromLatin1Len ( qsizetype l)
static

Definition at line 1965 of file qstringconverter.cpp.

◆ fromLocal8Bit()

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

Definition at line 1939 of file qstringconverter.cpp.

◆ fromUtf16()

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

Definition at line 1856 of file qstringconverter.cpp.

◆ fromUtf16BE()

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

Definition at line 1866 of file qstringconverter.cpp.

◆ fromUtf16LE()

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

Definition at line 1876 of file qstringconverter.cpp.

◆ fromUtf16Len()

static qsizetype fromUtf16Len ( qsizetype l)
static

Definition at line 1958 of file qstringconverter.cpp.

◆ fromUtf32()

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

Definition at line 1886 of file qstringconverter.cpp.

◆ fromUtf32BE()

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

Definition at line 1896 of file qstringconverter.cpp.

◆ fromUtf32LE()

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

Definition at line 1906 of file qstringconverter.cpp.

◆ fromUtf32Len()

static qsizetype fromUtf32Len ( qsizetype l)
static

Definition at line 1961 of file qstringconverter.cpp.

◆ fromUtf8Len()

static qsizetype fromUtf8Len ( qsizetype l)
static

Definition at line 1954 of file qstringconverter.cpp.

◆ nameMatch()

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

Definition at line 2142 of file qstringconverter.cpp.

◆ nameMatch_impl() [1/3]

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

Definition at line 2127 of file qstringconverter.cpp.

◆ nameMatch_impl() [2/3]

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

Definition at line 2137 of file qstringconverter.cpp.

◆ nameMatch_impl() [3/3]

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

Definition at line 2132 of file qstringconverter.cpp.

◆ nameMatch_impl_impl()

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

Definition at line 2111 of file qstringconverter.cpp.

◆ parseHtmlMetaForEncoding()

static QByteArray parseHtmlMetaForEncoding ( QByteArrayView data)
static

Definition at line 2556 of file qstringconverter.cpp.

◆ simdCompareAscii()

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

Definition at line 666 of file qstringconverter.cpp.

◆ simdDecodeAscii()

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

Definition at line 655 of file qstringconverter.cpp.

◆ simdEncodeAscii()

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

Definition at line 650 of file qstringconverter.cpp.

◆ simdFindNonAscii()

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

Definition at line 660 of file qstringconverter.cpp.

◆ toLatin1Len()

static qsizetype toLatin1Len ( qsizetype l)
static

Definition at line 1966 of file qstringconverter.cpp.

◆ toLocal8Bit()

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

Definition at line 1946 of file qstringconverter.cpp.

◆ toUtf16()

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

Definition at line 1861 of file qstringconverter.cpp.

◆ toUtf16BE()

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

Definition at line 1871 of file qstringconverter.cpp.

◆ toUtf16LE()

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

Definition at line 1881 of file qstringconverter.cpp.

◆ toUtf16Len()

static qsizetype toUtf16Len ( qsizetype l)
static

Definition at line 1959 of file qstringconverter.cpp.

◆ toUtf32()

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

Definition at line 1891 of file qstringconverter.cpp.

◆ toUtf32BE()

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

Definition at line 1901 of file qstringconverter.cpp.

◆ toUtf32LE()

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

Definition at line 1911 of file qstringconverter.cpp.

◆ toUtf32Len()

static qsizetype toUtf32Len ( qsizetype l)
static

Definition at line 1962 of file qstringconverter.cpp.

◆ toUtf8Len()

static qsizetype toUtf8Len ( qsizetype l)
static

Definition at line 1955 of file qstringconverter.cpp.

Variable Documentation

◆ utf8bom

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

Definition at line 57 of file qstringconverter.cpp.