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
QStringAlgorithms< StringType > Struct Template Reference

#include <qstringalgorithms_p.h>

Collaboration diagram for QStringAlgorithms< StringType >:

Classes

struct  TrimPositions

Public Types

typedef StringType::value_type Char
typedef StringType::size_type size_type
typedef std::remove_cv< StringType >::type NakedStringType
using ViewType
using ViewChar = typename ViewType::storage_type

Static Public Member Functions

static bool isSpace (char ch)
static bool isSpace (QChar ch)
static StringType trimmed_helper_inplace (NakedStringType &str, const Char *begin, const Char *end)
static StringType trimmed_helper_inplace (const NakedStringType &, const Char *, const Char *)
static TrimPositions trimmed_helper_positions (const StringType &str)
static StringType trimmed_helper (StringType &str)
static StringType simplified_helper (StringType &str)
static bool needsReallocate (const StringType &str, qsizetype newSize) noexcept
static const ViewCharasUnicodeChar (ViewType v)
static qsizetype newSize (StringType &src, qsizetype bsize, ViewType after, QSpan< const qsizetype > indices)
static void setSize (StringType &src, qsizetype newSize)
static void replace_into_copy (StringType &src, qsizetype bsize, ViewType after, QSpan< const qsizetype > indices, qsizetype newlen)
static void replace_equal_len (StringType &src, qsizetype bsize, ViewType after, QSpan< const qsizetype > indices)
static void replace_shrink (StringType &src, qsizetype bsize, ViewType after, QSpan< const qsizetype > indices)
static void replace_grow (StringType &src, qsizetype bsize, ViewType after, QSpan< const qsizetype > indices, qsizetype newlen)
static void replace_helper (StringType &src, qsizetype bsize, ViewType after, QSpan< const qsizetype > indices)

Static Public Attributes

static const bool isConst = std::is_const<StringType>::value

Detailed Description

template<typename StringType>
struct QStringAlgorithms< StringType >

Definition at line 25 of file qstringalgorithms_p.h.

Member Typedef Documentation

◆ Char

template<typename StringType>
typedef StringType::value_type QStringAlgorithms< StringType >::Char

Definition at line 27 of file qstringalgorithms_p.h.

◆ NakedStringType

template<typename StringType>
typedef std::remove_cv<StringType>::type QStringAlgorithms< StringType >::NakedStringType

Definition at line 29 of file qstringalgorithms_p.h.

◆ size_type

template<typename StringType>
typedef StringType::size_type QStringAlgorithms< StringType >::size_type

Definition at line 28 of file qstringalgorithms_p.h.

◆ ViewChar

template<typename StringType>
using QStringAlgorithms< StringType >::ViewChar = typename ViewType::storage_type

Definition at line 32 of file qstringalgorithms_p.h.

◆ ViewType

template<typename StringType>
using QStringAlgorithms< StringType >::ViewType
Initial value:
std::conditional_t<std::is_same_v<StringType, QString>, QStringView, QByteArrayView>
\inmodule QtCore
Definition qstringview.h:77

Definition at line 30 of file qstringalgorithms_p.h.

Member Function Documentation

◆ asUnicodeChar()

template<typename StringType>
const ViewChar * QStringAlgorithms< StringType >::asUnicodeChar ( ViewType v)
inlinestatic

Definition at line 132 of file qstringalgorithms_p.h.

◆ isSpace() [1/2]

template<typename StringType>
bool QStringAlgorithms< StringType >::isSpace ( char ch)
inlinestatic

Definition at line 35 of file qstringalgorithms_p.h.

◆ isSpace() [2/2]

template<typename StringType>
bool QStringAlgorithms< StringType >::isSpace ( QChar ch)
inlinestatic

Definition at line 36 of file qstringalgorithms_p.h.

◆ needsReallocate()

template<typename StringType>
bool QStringAlgorithms< StringType >::needsReallocate ( const StringType & str,
qsizetype newSize )
inlinestaticnoexcept

Definition at line 126 of file qstringalgorithms_p.h.

◆ newSize()

template<typename StringType>
qsizetype QStringAlgorithms< StringType >::newSize ( StringType & src,
qsizetype bsize,
ViewType after,
QSpan< const qsizetype > indices )
inlinestatic

Definition at line 140 of file qstringalgorithms_p.h.

◆ replace_equal_len()

template<typename StringType>
void QStringAlgorithms< StringType >::replace_equal_len ( StringType & src,
qsizetype bsize,
ViewType after,
QSpan< const qsizetype > indices )
inlinestatic

Definition at line 186 of file qstringalgorithms_p.h.

◆ replace_grow()

template<typename StringType>
void QStringAlgorithms< StringType >::replace_grow ( StringType & src,
qsizetype bsize,
ViewType after,
QSpan< const qsizetype > indices,
qsizetype newlen )
inlinestatic

Definition at line 222 of file qstringalgorithms_p.h.

◆ replace_helper()

template<typename StringType>
void QStringAlgorithms< StringType >::replace_helper ( StringType & src,
qsizetype bsize,
ViewType after,
QSpan< const qsizetype > indices )
inlinestatic

Definition at line 243 of file qstringalgorithms_p.h.

◆ replace_into_copy()

template<typename StringType>
void QStringAlgorithms< StringType >::replace_into_copy ( StringType & src,
qsizetype bsize,
ViewType after,
QSpan< const qsizetype > indices,
qsizetype newlen )
inlinestatic

Definition at line 167 of file qstringalgorithms_p.h.

◆ replace_shrink()

template<typename StringType>
void QStringAlgorithms< StringType >::replace_shrink ( StringType & src,
qsizetype bsize,
ViewType after,
QSpan< const qsizetype > indices )
inlinestatic

Definition at line 199 of file qstringalgorithms_p.h.

◆ setSize()

template<typename StringType>
void QStringAlgorithms< StringType >::setSize ( StringType & src,
qsizetype newSize )
inlinestatic

Definition at line 154 of file qstringalgorithms_p.h.

◆ simplified_helper()

template<typename StringType>
StringType QStringAlgorithms< StringType >::simplified_helper ( StringType & str)
inlinestatic

Definition at line 90 of file qstringalgorithms_p.h.

◆ trimmed_helper()

template<typename StringType>
StringType QStringAlgorithms< StringType >::trimmed_helper ( StringType & str)
inlinestatic

Definition at line 80 of file qstringalgorithms_p.h.

◆ trimmed_helper_inplace() [1/2]

template<typename StringType>
StringType QStringAlgorithms< StringType >::trimmed_helper_inplace ( const NakedStringType & ,
const Char * ,
const Char *  )
inlinestatic

Definition at line 52 of file qstringalgorithms_p.h.

◆ trimmed_helper_inplace() [2/2]

template<typename StringType>
StringType QStringAlgorithms< StringType >::trimmed_helper_inplace ( NakedStringType & str,
const Char * begin,
const Char * end )
inlinestatic

Definition at line 42 of file qstringalgorithms_p.h.

◆ trimmed_helper_positions()

template<typename StringType>
TrimPositions QStringAlgorithms< StringType >::trimmed_helper_positions ( const StringType & str)
inlinestaticnodiscard

Definition at line 67 of file qstringalgorithms_p.h.

Member Data Documentation

◆ isConst

template<typename StringType>
const bool QStringAlgorithms< StringType >::isConst = std::is_const<StringType>::value
static

Definition at line 33 of file qstringalgorithms_p.h.


The documentation for this struct was generated from the following file: