Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
 

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 Public Attributes

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

Detailed Description

template<typename StringType>
struct QStringAlgorithms< StringType >

Definition at line 23 of file qstringalgorithms_p.h.

Member Typedef Documentation

◆ Char

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

Definition at line 25 of file qstringalgorithms_p.h.

◆ NakedStringType

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

Definition at line 27 of file qstringalgorithms_p.h.

◆ size_type

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

Definition at line 26 of file qstringalgorithms_p.h.

Member Function Documentation

◆ isSpace() [1/2]

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

Definition at line 30 of file qstringalgorithms_p.h.

References ascii_isspace(), and ch.

Referenced by QStringAlgorithms< StringType >::simplified_helper(), and QStringAlgorithms< StringType >::trimmed_helper_positions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSpace() [2/2]

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

Definition at line 31 of file qstringalgorithms_p.h.

References ch.

◆ simplified_helper()

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

Definition at line 85 of file qstringalgorithms_p.h.

References QString::cbegin(), QString::cend(), forever, QStringAlgorithms< StringType >::isConst, QString::isDetached(), QString::isEmpty(), QStringAlgorithms< StringType >::isSpace(), ptr(), QString::resize(), QString::size(), str, and Qt::Uninitialized.

+ Here is the call graph for this function:

◆ trimmed_helper()

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

Definition at line 75 of file qstringalgorithms_p.h.

References begin(), QString::cbegin(), QString::cend(), QStringAlgorithms< StringType >::isConst, QString::isDetached(), str, QStringAlgorithms< StringType >::trimmed_helper_inplace(), and QStringAlgorithms< StringType >::trimmed_helper_positions().

+ Here is the call graph for this function:

◆ trimmed_helper_inplace() [1/2]

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

Definition at line 47 of file qstringalgorithms_p.h.

◆ trimmed_helper_inplace() [2/2]

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

Definition at line 37 of file qstringalgorithms_p.h.

References begin(), QString::cbegin(), QString::resize(), and str.

Referenced by QStringAlgorithms< StringType >::trimmed_helper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trimmed_helper_positions()

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

Definition at line 62 of file qstringalgorithms_p.h.

References begin(), QString::cbegin(), QString::cend(), QStringAlgorithms< StringType >::isSpace(), and str.

Referenced by QtPrivate::trimmed(), and QStringAlgorithms< StringType >::trimmed_helper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ isConst

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

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