QtBase  v6.3.1
Public Member Functions | Static Public Member Functions | Friends | List of all members
ProString Class Reference

#include <proitems.h>

Inheritance diagram for ProString:
Inheritance graph
[legend]

Public Member Functions

 ProString ()
 
 ProString (const ProString &other)
 
ProStringoperator= (const ProString &)=default
 
template<typename A , typename B >
ProStringoperator= (const QStringBuilder< A, B > &str)
 
 ProString (const QString &str)
 
PROITEM_EXPLICIT ProString (QStringView str)
 
PROITEM_EXPLICIT ProString (const char *str)
 
template<typename A , typename B >
 ProString (const QStringBuilder< A, B > &str)
 
 ProString (const QString &str, int offset, int length)
 
void setValue (const QString &str)
 
void clear ()
 
ProStringsetSource (const ProString &other)
 
ProStringsetSource (int id)
 
int sourceFile () const
 
ProStringprepend (const ProString &other)
 
ProStringappend (const ProString &other, bool *pending=nullptr)
 
ProStringappend (const QString &other)
 
template<typename A , typename B >
ProStringappend (const QStringBuilder< A, B > &other)
 
ProStringappend (const QLatin1String other)
 
ProStringappend (const char *other)
 
ProStringappend (QChar other)
 
ProStringappend (const ProStringList &other, bool *pending=nullptr, bool skipEmpty1st=false)
 
ProStringoperator+= (const ProString &other)
 
ProStringoperator+= (const QString &other)
 
template<typename A , typename B >
ProStringoperator+= (const QStringBuilder< A, B > &other)
 
ProStringoperator+= (const QLatin1String other)
 
ProStringoperator+= (const char *other)
 
ProStringoperator+= (QChar other)
 
void chop (int n)
 
void chopFront (int n)
 
bool operator== (const ProString &other) const
 
bool operator== (const QString &other) const
 
bool operator== (QStringView other) const
 
bool operator== (QLatin1String other) const
 
bool operator== (const char *other) const
 
bool operator!= (const ProString &other) const
 
bool operator!= (const QString &other) const
 
bool operator!= (QLatin1String other) const
 
bool operator!= (const char *other) const
 
bool operator< (const ProString &other) const
 
bool isNull () const
 
bool isEmpty () const
 
int length () const
 
int size () const
 
QChar at (int i) const
 
const QCharconstData () const
 
ProString mid (int off, int len=-1) const
 
ProString left (int len) const
 
ProString right (int len) const
 
ProString trimmed () const
 
int compare (const ProString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
int compare (const QString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
int compare (const char *sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
bool startsWith (const ProString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
bool startsWith (const QString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
bool startsWith (const char *sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
bool startsWith (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
template<typename A , typename B >
bool startsWith (const QStringBuilder< A, B > &str)
 
bool endsWith (const ProString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
bool endsWith (const QString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
bool endsWith (const char *sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
template<typename A , typename B >
bool endsWith (const QStringBuilder< A, B > &str)
 
bool endsWith (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
int indexOf (const QString &s, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
int indexOf (const char *s, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
int indexOf (QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
int lastIndexOf (const QString &s, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
int lastIndexOf (const char *s, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
int lastIndexOf (QChar c, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
bool contains (const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
bool contains (const char *s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
bool contains (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
qlonglong toLongLong (bool *ok=nullptr, int base=10) const
 
int toInt (bool *ok=nullptr, int base=10) const
 
short toShort (bool *ok=nullptr, int base=10) const
 
size_t hash () const
 
ALWAYS_INLINE QStringView toQStringView () const
 
ALWAYS_INLINE ProKeytoKey ()
 
ALWAYS_INLINE const ProKeytoKey () const
 
QString toQString () const
 
QStringtoQString (QString &tmp) const
 
QByteArray toLatin1 () const
 

Static Public Member Functions

static size_t hash (const QChar *p, int n)
 

Friends

class ProKey
 
size_t qHash (const ProString &str)
 
QString operator+ (const ProString &one, const ProString &two)
 

Detailed Description

Definition at line 68 of file proitems.h.

Constructor & Destructor Documentation

◆ ProString() [1/7]

ProString::ProString ( )

Definition at line 52 of file proitems.cpp.

Here is the caller graph for this function:

◆ ProString() [2/7]

ProString::ProString ( const ProString other)

Definition at line 57 of file proitems.cpp.

◆ ProString() [3/7]

ProString::ProString ( const QString str)

Definition at line 73 of file proitems.cpp.

◆ ProString() [4/7]

ProString::ProString ( QStringView  str)

Definition at line 78 of file proitems.cpp.

◆ ProString() [5/7]

ProString::ProString ( const char *  str)

Definition at line 89 of file proitems.cpp.

◆ ProString() [6/7]

template<typename A , typename B >
ProString::ProString ( const QStringBuilder< A, B > &  str)
inline

Definition at line 80 of file proitems.h.

◆ ProString() [7/7]

ProString::ProString ( const QString str,
int  offset,
int  length 
)

Definition at line 105 of file proitems.cpp.

Member Function Documentation

◆ append() [1/7]

ProString& ProString::append ( const char *  other)
inline

Definition at line 96 of file proitems.h.

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

◆ append() [2/7]

ProString & ProString::append ( const ProString other,
bool *  pending = nullptr 
)

Definition at line 214 of file proitems.cpp.

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

◆ append() [3/7]

ProString & ProString::append ( const ProStringList other,
bool *  pending = nullptr,
bool  skipEmpty1st = false 
)

Definition at line 239 of file proitems.cpp.

Here is the call graph for this function:

◆ append() [4/7]

ProString & ProString::append ( const QLatin1String  other)

Definition at line 181 of file proitems.cpp.

Here is the call graph for this function:

◆ append() [5/7]

ProString& ProString::append ( const QString other)
inline

Definition at line 92 of file proitems.h.

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

◆ append() [6/7]

template<typename A , typename B >
ProString& ProString::append ( const QStringBuilder< A, B > &  other)
inline

Definition at line 94 of file proitems.h.

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

◆ append() [7/7]

ProString & ProString::append ( QChar  other)

Definition at line 198 of file proitems.cpp.

Here is the call graph for this function:

◆ at()

QChar ProString::at ( int  i) const
inline

Definition at line 124 of file proitems.h.

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

◆ chop()

void ProString::chop ( int  n)
inline

Definition at line 107 of file proitems.h.

◆ chopFront()

void ProString::chopFront ( int  n)
inline

Definition at line 108 of file proitems.h.

◆ clear()

void ProString::clear ( )
inline

Definition at line 85 of file proitems.h.

Here is the call graph for this function:

◆ compare() [1/3]

int ProString::compare ( const char *  sub,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 132 of file proitems.h.

Here is the call graph for this function:

◆ compare() [2/3]

int ProString::compare ( const ProString sub,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 130 of file proitems.h.

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

◆ compare() [3/3]

int ProString::compare ( const QString sub,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 131 of file proitems.h.

Here is the call graph for this function:

◆ constData()

const QChar* ProString::constData ( ) const
inline

Definition at line 125 of file proitems.h.

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

◆ contains() [1/3]

bool ProString::contains ( const char *  s,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 152 of file proitems.h.

Here is the call graph for this function:

◆ contains() [2/3]

bool ProString::contains ( const QString s,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 151 of file proitems.h.

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

◆ contains() [3/3]

bool ProString::contains ( QChar  c,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 153 of file proitems.h.

Here is the call graph for this function:

◆ endsWith() [1/5]

bool ProString::endsWith ( const char *  sub,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 141 of file proitems.h.

Here is the call graph for this function:

◆ endsWith() [2/5]

bool ProString::endsWith ( const ProString sub,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 139 of file proitems.h.

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

◆ endsWith() [3/5]

bool ProString::endsWith ( const QString sub,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 140 of file proitems.h.

Here is the call graph for this function:

◆ endsWith() [4/5]

template<typename A , typename B >
bool ProString::endsWith ( const QStringBuilder< A, B > &  str)
inline

Definition at line 143 of file proitems.h.

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

◆ endsWith() [5/5]

bool ProString::endsWith ( QChar  c,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 144 of file proitems.h.

Here is the call graph for this function:

◆ hash() [1/2]

size_t ProString::hash ( ) const
inline

Definition at line 158 of file proitems.h.

Here is the caller graph for this function:

◆ hash() [2/2]

QT_BEGIN_NAMESPACE size_t ProString::hash ( const QChar p,
int  n 
)
static

Definition at line 40 of file proitems.cpp.

Here is the caller graph for this function:

◆ indexOf() [1/3]

int ProString::indexOf ( const char *  s,
int  from = 0,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 146 of file proitems.h.

Here is the call graph for this function:

◆ indexOf() [2/3]

int ProString::indexOf ( const QString s,
int  from = 0,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 145 of file proitems.h.

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

◆ indexOf() [3/3]

int ProString::indexOf ( QChar  c,
int  from = 0,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 147 of file proitems.h.

Here is the call graph for this function:

◆ isEmpty()

bool ProString::isEmpty ( ) const
inline

Definition at line 121 of file proitems.h.

Here is the caller graph for this function:

◆ isNull()

bool ProString::isNull ( ) const
inline

Definition at line 120 of file proitems.h.

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

◆ lastIndexOf() [1/3]

int ProString::lastIndexOf ( const char *  s,
int  from = -1,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 149 of file proitems.h.

Here is the call graph for this function:

◆ lastIndexOf() [2/3]

int ProString::lastIndexOf ( const QString s,
int  from = -1,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 148 of file proitems.h.

Here is the call graph for this function:

◆ lastIndexOf() [3/3]

int ProString::lastIndexOf ( QChar  c,
int  from = -1,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 150 of file proitems.h.

Here is the call graph for this function:

◆ left()

ProString ProString::left ( int  len) const
inline

Definition at line 127 of file proitems.h.

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

◆ length()

int ProString::length ( ) const
inline

Definition at line 122 of file proitems.h.

◆ mid()

ProString ProString::mid ( int  off,
int  len = -1 
) const

Definition at line 298 of file proitems.cpp.

Here is the caller graph for this function:

◆ operator!=() [1/4]

bool ProString::operator!= ( const char *  other) const
inline

Definition at line 118 of file proitems.h.

Here is the call graph for this function:

◆ operator!=() [2/4]

bool ProString::operator!= ( const ProString other) const
inline

Definition at line 115 of file proitems.h.

Here is the call graph for this function:

◆ operator!=() [3/4]

bool ProString::operator!= ( const QString other) const
inline

Definition at line 116 of file proitems.h.

Here is the call graph for this function:

◆ operator!=() [4/4]

bool ProString::operator!= ( QLatin1String  other) const
inline

Definition at line 117 of file proitems.h.

Here is the call graph for this function:

◆ operator+=() [1/6]

ProString& ProString::operator+= ( const char *  other)
inline

Definition at line 104 of file proitems.h.

Here is the call graph for this function:

◆ operator+=() [2/6]

ProString& ProString::operator+= ( const ProString other)
inline

Definition at line 99 of file proitems.h.

Here is the call graph for this function:

◆ operator+=() [3/6]

ProString& ProString::operator+= ( const QLatin1String  other)
inline

Definition at line 103 of file proitems.h.

Here is the call graph for this function:

◆ operator+=() [4/6]

ProString& ProString::operator+= ( const QString other)
inline

Definition at line 100 of file proitems.h.

Here is the call graph for this function:

◆ operator+=() [5/6]

template<typename A , typename B >
ProString& ProString::operator+= ( const QStringBuilder< A, B > &  other)
inline

Definition at line 102 of file proitems.h.

Here is the call graph for this function:

◆ operator+=() [6/6]

ProString& ProString::operator+= ( QChar  other)
inline

Definition at line 105 of file proitems.h.

Here is the call graph for this function:

◆ operator<()

bool ProString::operator< ( const ProString other) const
inline

Definition at line 119 of file proitems.h.

Here is the call graph for this function:

◆ operator=() [1/2]

ProString& ProString::operator= ( const ProString )
default

◆ operator=() [2/2]

template<typename A , typename B >
ProString& ProString::operator= ( const QStringBuilder< A, B > &  str)
inline

Definition at line 74 of file proitems.h.

◆ operator==() [1/5]

bool ProString::operator== ( const char *  other) const
inline

Definition at line 114 of file proitems.h.

Here is the call graph for this function:

◆ operator==() [2/5]

bool ProString::operator== ( const ProString other) const
inline

Definition at line 110 of file proitems.h.

Here is the call graph for this function:

◆ operator==() [3/5]

bool ProString::operator== ( const QString other) const
inline

Definition at line 111 of file proitems.h.

Here is the call graph for this function:

◆ operator==() [4/5]

bool ProString::operator== ( QLatin1String  other) const
inline

Definition at line 113 of file proitems.h.

Here is the call graph for this function:

◆ operator==() [5/5]

bool ProString::operator== ( QStringView  other) const
inline

Definition at line 112 of file proitems.h.

Here is the call graph for this function:

◆ prepend()

ProString & ProString::prepend ( const ProString other)

Definition at line 164 of file proitems.cpp.

Here is the call graph for this function:

◆ right()

ProString ProString::right ( int  len) const
inline

Definition at line 128 of file proitems.h.

Here is the call graph for this function:

◆ setSource() [1/2]

ProString& ProString::setSource ( const ProString other)
inline

Definition at line 86 of file proitems.h.

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

◆ setSource() [2/2]

ProString& ProString::setSource ( int  id)
inline

Definition at line 87 of file proitems.h.

◆ setValue()

void ProString::setValue ( const QString str)

Definition at line 110 of file proitems.cpp.

Here is the call graph for this function:

◆ size()

int ProString::size ( ) const
inline

Definition at line 123 of file proitems.h.

◆ sourceFile()

int ProString::sourceFile ( ) const
inline

Definition at line 88 of file proitems.h.

◆ startsWith() [1/5]

bool ProString::startsWith ( const char *  sub,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 135 of file proitems.h.

Here is the call graph for this function:

◆ startsWith() [2/5]

bool ProString::startsWith ( const ProString sub,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 133 of file proitems.h.

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

◆ startsWith() [3/5]

bool ProString::startsWith ( const QString sub,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 134 of file proitems.h.

Here is the call graph for this function:

◆ startsWith() [4/5]

template<typename A , typename B >
bool ProString::startsWith ( const QStringBuilder< A, B > &  str)
inline

Definition at line 138 of file proitems.h.

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

◆ startsWith() [5/5]

bool ProString::startsWith ( QChar  c,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inline

Definition at line 136 of file proitems.h.

Here is the call graph for this function:

◆ toInt()

int ProString::toInt ( bool *  ok = nullptr,
int  base = 10 
) const
inline

Definition at line 155 of file proitems.h.

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

◆ toKey() [1/2]

ALWAYS_INLINE ProKey& ProString::toKey ( )
inline

Definition at line 163 of file proitems.h.

Here is the caller graph for this function:

◆ toKey() [2/2]

ALWAYS_INLINE const ProKey& ProString::toKey ( ) const
inline

Definition at line 164 of file proitems.h.

◆ toLatin1()

QByteArray ProString::toLatin1 ( ) const
inline

Definition at line 169 of file proitems.h.

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

◆ toLongLong()

qlonglong ProString::toLongLong ( bool *  ok = nullptr,
int  base = 10 
) const
inline

Definition at line 154 of file proitems.h.

Here is the call graph for this function:

◆ toQString() [1/2]

QString ProString::toQString ( ) const

Definition at line 153 of file proitems.cpp.

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

◆ toQString() [2/2]

QString & ProString::toQString ( QString tmp) const

Definition at line 158 of file proitems.cpp.

Here is the call graph for this function:

◆ toQStringView()

ALWAYS_INLINE QStringView ProString::toQStringView ( ) const
inline

Definition at line 161 of file proitems.h.

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

◆ toShort()

short ProString::toShort ( bool *  ok = nullptr,
int  base = 10 
) const
inline

Definition at line 156 of file proitems.h.

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

◆ trimmed()

ProString ProString::trimmed ( ) const

Definition at line 310 of file proitems.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator+

QString operator+ ( const ProString one,
const ProString two 
)
friend

Definition at line 281 of file proitems.cpp.

◆ ProKey

friend class ProKey
friend

Definition at line 191 of file proitems.h.

◆ qHash

size_t qHash ( const ProString str)
friend

Definition at line 120 of file proitems.cpp.


The documentation for this class was generated from the following files: