Qt 4.8
|
The QLatin1Literal class provides a thin wrapper around string literals used in source code. More...
#include <qstringbuilder.h>
Public Functions | |
const char * | data () const |
Returns a pointer to the first character of the string literal. More... | |
template<int N> | |
QLatin1Literal (const char(&str)[N]) | |
Constructs a new literal from the string str. More... | |
int | size () const |
Returns the number of characters in the literal excluding the trailing NULL char. More... | |
Properties | |
const char *const | m_data |
const int | m_size |
The QLatin1Literal class provides a thin wrapper around string literals used in source code.
Unlike QLatin1String
, a QLatin1Literal
can retrieve its size without iterating over the literal.
The main use of QLatin1Literal
is in conjunction with QStringBuilder
to reduce the number of reallocations needed to build up a string from smaller chunks.
Definition at line 63 of file qstringbuilder.h.
|
inline |
|
inline |
Returns a pointer to the first character of the string literal.
The string literal is terminated by a NUL character.
Definition at line 67 of file qstringbuilder.h.
Referenced by QConcatenable< QLatin1Literal >::appendTo().
|
inline |
Returns the number of characters in the literal excluding the trailing NULL char.
Definition at line 66 of file qstringbuilder.h.
Referenced by QConcatenable< QLatin1Literal >::size().
|
private |
Definition at line 75 of file qstringbuilder.h.
|
private |
Definition at line 74 of file qstringbuilder.h.