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

(29a6cb338604d53c74a06ce0eca8c9a9039a98d0)

#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 }
 
enum  { HeaderDone = 1 }
 
enum  { Endian = 0 , Data = 1 }
 
enum  { 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

anonymous enum
Enumerator
Endian 
Data 

Definition at line 50 of file qstringconverter.cpp.

◆ anonymous enum

anonymous enum
Enumerator
HeaderDone 

Definition at line 666 of file qstringconverter.cpp.

◆ anonymous enum

anonymous enum
Enumerator
Endian 
Data 

Definition at line 50 of file qstringconverter.cpp.

◆ anonymous enum

anonymous enum
Enumerator
HeaderDone 

Definition at line 666 of file qstringconverter.cpp.

Function Documentation

◆ availableCodecCount()

static qsizetype availableCodecCount ( )
static

Definition at line 2612 of file qstringconverter.cpp.

◆ fromLatin1Len()

static qsizetype fromLatin1Len ( qsizetype l)
static

Definition at line 1956 of file qstringconverter.cpp.

◆ fromLocal8Bit()

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

Definition at line 1930 of file qstringconverter.cpp.

◆ fromUtf16()

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

Definition at line 1847 of file qstringconverter.cpp.

◆ fromUtf16BE()

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

Definition at line 1857 of file qstringconverter.cpp.

◆ fromUtf16LE()

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

Definition at line 1867 of file qstringconverter.cpp.

◆ fromUtf16Len()

static qsizetype fromUtf16Len ( qsizetype l)
static

Definition at line 1949 of file qstringconverter.cpp.

◆ fromUtf32()

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

Definition at line 1877 of file qstringconverter.cpp.

◆ fromUtf32BE()

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

Definition at line 1887 of file qstringconverter.cpp.

◆ fromUtf32LE()

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

Definition at line 1897 of file qstringconverter.cpp.

◆ fromUtf32Len()

static qsizetype fromUtf32Len ( qsizetype l)
static

Definition at line 1952 of file qstringconverter.cpp.

◆ fromUtf8Len()

static qsizetype fromUtf8Len ( qsizetype l)
static

Definition at line 1945 of file qstringconverter.cpp.

◆ nameMatch()

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

Definition at line 2139 of file qstringconverter.cpp.

◆ nameMatch_impl() [1/3]

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

Definition at line 2124 of file qstringconverter.cpp.

◆ nameMatch_impl() [2/3]

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

Definition at line 2134 of file qstringconverter.cpp.

◆ nameMatch_impl() [3/3]

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

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

◆ parseHtmlMetaForEncoding()

static QByteArray parseHtmlMetaForEncoding ( QByteArrayView data)
static

Definition at line 2553 of file qstringconverter.cpp.

◆ simdCompareAscii()

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

Definition at line 661 of file qstringconverter.cpp.

◆ simdDecodeAscii()

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

Definition at line 650 of file qstringconverter.cpp.

◆ simdEncodeAscii()

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

Definition at line 645 of file qstringconverter.cpp.

◆ simdFindNonAscii()

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

Definition at line 655 of file qstringconverter.cpp.

◆ toLatin1Len()

static qsizetype toLatin1Len ( qsizetype l)
static

Definition at line 1957 of file qstringconverter.cpp.

◆ toLocal8Bit()

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

Definition at line 1937 of file qstringconverter.cpp.

◆ toUtf16()

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

Definition at line 1852 of file qstringconverter.cpp.

◆ toUtf16BE()

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

Definition at line 1862 of file qstringconverter.cpp.

◆ toUtf16LE()

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

Definition at line 1872 of file qstringconverter.cpp.

◆ toUtf16Len()

static qsizetype toUtf16Len ( qsizetype l)
static

Definition at line 1950 of file qstringconverter.cpp.

◆ toUtf32()

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

Definition at line 1882 of file qstringconverter.cpp.

◆ toUtf32BE()

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

Definition at line 1892 of file qstringconverter.cpp.

◆ toUtf32LE()

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

Definition at line 1902 of file qstringconverter.cpp.

◆ toUtf32Len()

static qsizetype toUtf32Len ( qsizetype l)
static

Definition at line 1953 of file qstringconverter.cpp.

◆ toUtf8Len()

static qsizetype toUtf8Len ( qsizetype l)
static

Definition at line 1946 of file qstringconverter.cpp.

Variable Documentation

◆ utf8bom

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

Definition at line 52 of file qstringconverter.cpp.