7 #if defined(_OS_SUN_) && defined(_CC_GNU_) 28 bool resize( uint newlen );
29 bool enlarge( uint newlen );
30 void setLen( uint newlen );
33 QGString &operator=(
const char *str );
35 QGString &operator+=(
const char *str );
38 bool isNull()
const {
return m_data==0; }
39 bool isEmpty()
const {
return m_len==0; }
40 uint length()
const {
return m_len; }
41 uint size()
const {
return m_memSize; }
42 char * data()
const {
return m_data; }
43 bool truncate( uint pos ) {
return resize(pos+1); }
44 operator const char *()
const {
return (
const char *)data(); }
45 char &at( uint index )
const {
return m_data[index]; }
46 char &operator[](
int i )
const {
return at(i); }
59 {
return qstrcmp(s1.data(),s2.data()) == 0; }
61 Q_EXPORT
inline bool operator==(
const QGString &s1,
const char *s2 )
62 {
return qstrcmp(s1.data(),s2) == 0; }
64 Q_EXPORT
inline bool operator==(
const char *s1,
const QGString &s2 )
65 {
return qstrcmp(s1,s2.data()) == 0; }
68 {
return qstrcmp(s1.data(),s2.data()) != 0; }
70 Q_EXPORT
inline bool operator!=(
const QGString &s1,
const char *s2 )
71 {
return qstrcmp(s1.data(),s2) != 0; }
73 Q_EXPORT
inline bool operator!=(
const char *s1,
const QGString &s2 )
74 {
return qstrcmp(s1,s2.data()) != 0; }
77 {
return qstrcmp(s1.data(),s2.data()) < 0; }
79 Q_EXPORT
inline bool operator<(
const QGString &s1,
const char *s2 )
80 {
return qstrcmp(s1.data(),s2) < 0; }
82 Q_EXPORT
inline bool operator<(
const char *s1,
const QGString &s2 )
83 {
return qstrcmp(s1,s2.data()) < 0; }
85 Q_EXPORT
inline bool operator<=(
const QGString &s1,
const char *s2 )
86 {
return qstrcmp(s1.data(),s2) <= 0; }
88 Q_EXPORT
inline bool operator<=(
const char *s1,
const QGString &s2 )
89 {
return qstrcmp(s1,s2.data()) <= 0; }
91 Q_EXPORT
inline bool operator>(
const QGString &s1,
const char *s2 )
92 {
return qstrcmp(s1.data(),s2) > 0; }
94 Q_EXPORT
inline bool operator>(
const char *s1,
const QGString &s2 )
95 {
return qstrcmp(s1,s2.data()) > 0; }
97 Q_EXPORT
inline bool operator>=(
const QGString &s1,
const char *s2 )
98 {
return qstrcmp(s1.data(),s2) >= 0; }
100 Q_EXPORT
inline bool operator>=(
const char *s1,
const QGString &s2 )
101 {
return qstrcmp(s1,s2.data()) >= 0; }
This is an alternative implementation of QCString.
Definition: qgstring.h:19