doxygen  1.8.18
About: Doxygen is a source code documentation generator tool for C++, C, Objective-C, C#, PHP, Java, Python, IDL (diverse flavors), Fortran, VHDL, Tcl, and to some extent D. Different output formats are supported.
  Fossies Dox: doxygen-1.8.18.src.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

qcstring.cpp
Go to the documentation of this file.
1 
16 #include "qcstring.h"
17 #include "qgstring.h"
18 
19 #include <qstring.h>
20 #include <limits.h>
21 #include <stdlib.h>
22 #include <stdio.h>
23 #include <stdarg.h>
24 #include <ctype.h>
25 #include <qregexp.h>
26 #include <qdatastream.h>
27 
28 QCString &QCString::sprintf( const char *format, ... )
29 {
30  va_list ap;
31  va_start( ap, format );
32  const int minlen=256;
33  int l = length();
34  if (l<minlen) { resize(minlen); l=minlen; }
35  int n=vsnprintf( rawData(), l, format, ap);
36  if (n<0) n=l;
37  resize(n+1);
38  va_end( ap );
39  return *this;
40 }
41 
42 int QCString::find( char c, int index, bool cs ) const
43 {
44  if (index<0 || index>=(int)length()) return -1; // index outside string
45  const char *pos;
46  if (cs)
47  {
48  pos = strchr(data()+index,c);
49  }
50  else
51  {
52  pos = data()+index;
53  c = tolower((unsigned char)c);
54  while (*pos && tolower((unsigned char)*pos)!=c) pos++;
55  if (!*pos && c) pos=0; // not found
56  }
57  return pos ? (int)(pos - data()) : -1;
58 }
59 
60 int QCString::find( const char *str, int index, bool cs ) const
61 {
62  int l = length();
63  if (index<0 || index>=l) return -1; // index outside string
64  if (!str) return -1; // no string to search for
65  if (!*str) return index; // empty string matching at index
66  const char *pos;
67  if (cs) // case sensitive
68  {
69  pos = strstr(data()+index,str);
70  }
71  else // case insensitive
72  {
73  pos = data();
74  int len = qstrlen(str);
75  while (*pos)
76  {
77  if (qstrnicmp(pos,str,len)==0) break;
78  pos++;
79  }
80  if (!*pos) pos = 0; // not found
81  }
82  return pos ? (int)(pos - data()) : -1;
83 }
84 
85 int QCString::find( const QCString &str, int index, bool cs ) const
86 {
87  return find(str.data(),index,cs);
88 }
89 
90 int QCString::find( const QRegExp &rx, int index ) const
91 {
92  if ( index < 0 )
93  index += length();
94  return rx.match( data(), index );
95 }
96 
97 int QCString::findRev( char c, int index, bool cs) const
98 {
99  const char *b = data();
100  const char *pos;
101  int len = length();
102  if (len==0) return -1; // empty string
103  if (index<0) // start from end
104  {
105  if (cs)
106  {
107  pos = strrchr(b,c);
108  return pos ? (int)(pos - b) : -1;
109  }
110  index=len;
111  }
112  else if (index>len) // bad index
113  {
114  return -1;
115  }
116  pos = b+index;
117  if (cs)
118  {
119  while ( pos>=b && *pos!=c) pos--;
120  }
121  else
122  {
123  c = tolower((unsigned char)c);
124  while ( pos>=b && tolower((unsigned char)*pos)!=c) pos--;
125  }
126  return pos>=b ? (int)(pos - b) : -1;
127 }
128 
129 int QCString::findRev( const char *str, int index, bool cs) const
130 {
131  int slen = qstrlen(str);
132  int len = length();
133  if (index<0) index = len-slen; // start from end
134  else if (index>len) return -1; // bad index
135  else if (index+slen>len) index=len-slen; // str would be too long
136  if (index<0) return -1; // no match possible
137  const char *pos = data()+index;
138  if (cs) // case sensitive
139  {
140  for (int i=index; i>=0; i--) if (qstrncmp(pos--,str,slen)==0) return i;
141  }
142  else // case insensitive
143  {
144  for (int i=index; i>=0; i--) if (qstrnicmp(pos,str,slen)==0) return i;
145  }
146  return -1;
147 }
148 
149 int QCString::findRev( const QRegExp &rx, int index ) const
150 {
151  if ( index < 0 ) // neg index ==> start from end
152  index += length();
153  if ( (uint)index > length() ) // bad index
154  return -1;
155  while( index >= 0 ) {
156  if ( rx.match( data(), index ) == index )
157  return index;
158  index--;
159  }
160  return -1;
161 }
162 
163 int QCString::contains( char c, bool cs ) const
164 {
165  if (length()==0) return 0;
166  int count=0;
167  const char *pos = data();
168  if (cs)
169  {
170  while (*pos) if (*pos++ == c) count++;
171  }
172  else
173  {
174  c = tolower((unsigned char)c);
175  while (*pos)
176  {
177  if (tolower((unsigned char)*pos)==c) count++;
178  pos++;
179  }
180  }
181  return count;
182 }
183 
184 int QCString::contains( const char *str, bool cs ) const
185 {
186  if (str==0 || length()==0) return 0;
187  int count=0;
188  const char *pos = data();
189  int len = qstrlen(str);
190  while (*pos)
191  {
192  if (cs)
193  {
194  if (qstrncmp(pos,str,len)==0) count++;
195  }
196  else
197  {
198  if (qstrnicmp(pos,str,len)==0) count++;
199  }
200  pos++;
201  }
202  return count;
203 }
204 
205 int QCString::contains( const QRegExp &rx ) const
206 {
207  if ( isEmpty() )
208  return rx.match( data() ) < 0 ? 0 : 1;
209  int count = 0;
210  int index = -1;
211  int len = length();
212  while ( index < len-1 ) { // count overlapping matches
213  index = rx.match( data(), index+1 );
214  if ( index < 0 )
215  break;
216  count++;
217  }
218  return count;
219 }
220 
221 bool QCString::startsWith( const char *s ) const
222 {
223  const char *p = data();
224  if (p==0 || s==0) return s==0;
225  while (*p!=0 && *p==*s) p++,s++;
226  return *s==0;
227 }
228 
229 bool QCString::stripPrefix(const char *prefix)
230 {
231  if (prefix==0 || length()==0) return FALSE;
232  int len = qstrlen(prefix);
233  if (qstrncmp(prefix,data(),len)==0)
234  {
235  m_rep=mid(len,length()-len).m_rep; // need to make a deep copy
236  return TRUE;
237  }
238  return FALSE;
239 }
240 
242 {
243  if (isEmpty())
244  {
245  return QCString();
246  }
247  else if (len>=length())
248  {
249  return QCString(data());
250  }
251  else
252  {
253  QCString s( len+1 );
254  memcpy( s.rawData(), data(), len);
255  return s;
256  }
257 }
258 
260 {
261  if (isEmpty())
262  {
263  return QCString();
264  }
265  else
266  {
267  int l = length();
268  if ((int)len>l) len=l;
269  const char *pos = data() + (l-len);
270  return QCString(pos);
271  }
272 }
273 
274 QCString QCString::mid( uint index, uint len) const
275 {
276  uint slen = (uint)length();
277  if (len==0xffffffff) len = slen-index;
278  if (isEmpty() || index>=slen || len==0)
279  {
280  return QCString();
281  }
282  else
283  {
284  const char *p = data()+index;
285  QCString s(len+1);
286  qstrncpy( s.rawData(), p, len+1 );
287  return s;
288  }
289 }
290 
292 {
293  if (length()==0) return QCString();
294  QCString s(data());
295  char *pos = s.rawData();
296  if (pos)
297  {
298  while (*pos)
299  {
300  *pos = tolower((unsigned char)*pos);
301  pos++;
302  }
303  }
304  return s;
305 }
306 
308 {
309  if (length()==0) return QCString();
310  QCString s(data());
311  char *pos = s.rawData();
312  if (pos)
313  {
314  while (*pos)
315  {
316  *pos = toupper((unsigned char)*pos);
317  pos++;
318  }
319  }
320  return s;
321 }
322 
324 {
325  if ( isEmpty() ) // nothing to do
326  return *this;
327 
328  const char *cs = data();
329  int reslen = length();
330  if ( !isspace((uchar)cs[0]) && !isspace((uchar)cs[reslen-1]) )
331  return *this; // returns a copy
332 
333  QCString result(cs);
334  char *s = result.rawData();
335  int start = 0;
336  int end = reslen - 1;
337  while ( isspace((uchar) s[start]) ) // skip white space from start
338  start++;
339  if ( s[start] == '\0' )
340  { // only white space
341  return QCString();
342  }
343  while ( end && isspace((uchar) s[end]) ) // skip white space from end
344  end--;
345  end -= start - 1;
346  qmemmove( s, &s[start], end );
347  result.resize( end + 1 );
348  return result;
349 }
350 
352 {
353  if ( isEmpty() ) // nothing to do
354  return *this;
355 
356  QCString result( length()+1 );
357  const char *from = data();
358  char *to = result.rawData();
359  char *first = to;
360  while ( TRUE )
361  {
362  while ( *from && isspace((uchar) *from) )
363  from++;
364  while ( *from && !isspace((uchar)*from) )
365  *to++ = *from++;
366  if ( *from )
367  *to++ = 0x20; // ' '
368  else
369  break;
370  }
371  if ( to > first && *(to-1) == 0x20 )
372  to--;
373  *to = '\0';
374  result.resize( (int)(to - result.data()) + 1 );
375  return result;
376 }
377 
378 QCString &QCString::assign( const char *str )
379 {
380  return operator=(str);
381 }
382 
383 QCString &QCString::insert( uint index, const char *s )
384 {
385  int len = s ? qstrlen(s) : 0;
386  if ( len == 0 ) return *this;
387  int olen = length();
388  int nlen = olen + len;
389  if ((int)index>=olen)
390  {
391  resize(nlen+index-olen+1);
392  memset(rawData()+olen, ' ', index-olen);
393  memcpy(rawData()+index,s, len+1);
394  }
395  else
396  {
397  resize(nlen+1);
398  qmemmove(rawData()+index+len,data()+index,olen-index+1);
399  memcpy(rawData()+index,s,len);
400  }
401  return *this;
402 }
403 
405 {
406  char buf[2];
407  buf[0] = c;
408  buf[1] = '\0';
409  return insert( index, buf );
410 }
411 QCString &QCString::append( const char *s )
412 {
413  return operator+=(s);
414 }
415 QCString &QCString::prepend( const char *s )
416 {
417  return insert(0,s);
418 }
420 {
421  uint olen = length();
422  if ( index + len >= olen ) // range problems
423  {
424  if ( index < olen ) // index ok
425  {
426  resize( index+1 );
427  }
428  }
429  else if ( len != 0 )
430  {
431  QCString tmp(olen-index-len+1);
432  qmemmove( tmp.rawData(), data()+index+len, olen-index-len+1 );
433  resize( olen-len+1 );
434  memcpy( rawData()+index,tmp.data(),tmp.length() );
435  }
436  return *this;
437 }
438 
439 QCString &QCString::replace( uint index, uint len, const char *s)
440 {
441  remove( index, len );
442  insert( index, s );
443  return *this;
444 }
445 
446 QCString &QCString::replace( const QRegExp &rx, const char *str )
447 {
448  if ( isEmpty() )
449  return *this;
450  int index = 0;
451  int slen = qstrlen(str);
452  int len;
453  while ( index < (int)length() ) {
454  index = rx.match( data(), index, &len, FALSE );
455  if ( index >= 0 ) {
456  replace( index, len, str );
457  index += slen;
458  if ( !len )
459  break; // Avoid infinite loop on 0-length matches, e.g. [a-z]*
460  }
461  else
462  break;
463  }
464  return *this;
465 }
466 
467 static bool ok_in_base( char c, int base )
468 {
469  if ( base <= 10 )
470  return c>='0' && c<='9' && (c-'0') < base;
471  else
472  return (c>='0' && c<='9') ||
473  (c >= 'a' && c < char('a'+base-10)) ||
474  (c >= 'A' && c < char('A'+base-10));
475 }
476 
477 short QCString::toShort(bool *ok, int base) const
478 {
479  long v = toLong( ok, base );
480  if ( ok && *ok && (v < -32768 || v > 32767) ) {
481  *ok = FALSE;
482  v = 0;
483  }
484  return (short)v;
485 }
486 
487 ushort QCString::toUShort(bool *ok,int base) const
488 {
489  ulong v = toULong( ok, base );
490  if ( ok && *ok && (v > 65535) ) {
491  *ok = FALSE;
492  v = 0;
493  }
494  return (ushort)v;
495 }
496 
497 int QCString::toInt(bool *ok, int base) const
498 {
499  return (int)toLong( ok, base );
500 }
501 
502 uint QCString::toUInt(bool *ok,int base) const
503 {
504  return (uint)toULong( ok, base );
505 }
506 
507 
508 long QCString::toLong(bool *ok,int base) const
509 {
510  const char *p = data();
511  long val=0;
512  int l = length();
513  const long max_mult = INT_MAX / base;
514  bool is_ok = FALSE;
515  int neg = 0;
516  if ( !p )
517  goto bye;
518  while ( l && isspace(*p) ) // skip leading space
519  l--,p++;
520  if ( l && *p == '-' ) {
521  l--;
522  p++;
523  neg = 1;
524  } else if ( *p == '+' ) {
525  l--;
526  p++;
527  }
528 
529  // NOTE: toULong() code is similar
530  if ( !l || !ok_in_base(*p,base) )
531  goto bye;
532  while ( l && ok_in_base(*p,base) ) {
533  l--;
534  int dv;
535  if ( *p>='0' && *p<='9' ) {
536  dv = *p-'0';
537  } else {
538  if ( *p >= 'a' && *p <= 'z' )
539  dv = *p - 'a' + 10;
540  else
541  dv = *p - 'A' + 10;
542  }
543  if ( val > max_mult || (val == max_mult && dv > (INT_MAX%base)+neg) )
544  goto bye;
545  val = base*val + dv;
546  p++;
547  }
548  if ( neg )
549  val = -val;
550  while ( l && isspace(*p) ) // skip trailing space
551  l--,p++;
552  if ( !l )
553  is_ok = TRUE;
554 bye:
555  if ( ok )
556  *ok = is_ok;
557  return is_ok ? val : 0;
558 }
559 
560 ulong QCString::toULong(bool *ok,int base) const
561 {
562  const char *p = data();
563  ulong val=0;
564  int l = length();
565  const ulong max_mult = 429496729; // UINT_MAX/10, rounded down
566  bool is_ok = FALSE;
567  if ( !p )
568  goto bye;
569  while ( l && isspace(*p) ) // skip leading space
570  l--,p++;
571  if ( *p == '+' )
572  l--,p++;
573 
574  // NOTE: toLong() code is similar
575  if ( !l || !ok_in_base(*p,base) )
576  goto bye;
577  while ( l && ok_in_base(*p,base) ) {
578  l--;
579  uint dv;
580  if ( *p>='0' && *p<='9' ) {
581  dv = *p-'0';
582  } else {
583  if ( *p >= 'a' && *p <= 'z' )
584  dv = *p - 'a' + 10;
585  else
586  dv = *p - 'A' + 10;
587  }
588  if ( val > max_mult || (val == max_mult && dv > (UINT_MAX%base)) )
589  goto bye;
590  val = base*val + dv;
591  p++;
592  }
593 
594  while ( l && isspace(*p) ) // skip trailing space
595  l--,p++;
596  if ( !l )
597  is_ok = TRUE;
598 bye:
599  if ( ok )
600  *ok = is_ok;
601  return is_ok ? val : 0;
602 }
603 
604 uint64 QCString::toUInt64(bool *ok,int base) const
605 {
606  const char *p = data();
607  uint64 val=0;
608  int l = length();
609  const uint64 max_mult = 1844674407370955161ULL; // ULLONG_MAX/10, rounded down
610  bool is_ok = FALSE;
611  if ( !p )
612  goto bye;
613  while ( l && isspace(*p) ) // skip leading space
614  l--,p++;
615  if ( *p == '+' )
616  l--,p++;
617 
618  // NOTE: toULong() code is similar
619  if ( !l || !ok_in_base(*p,base) )
620  goto bye;
621  while ( l && ok_in_base(*p,base) ) {
622  l--;
623  uint dv;
624  if ( *p>='0' && *p<='9' ) {
625  dv = *p-'0';
626  } else {
627  if ( *p >= 'a' && *p <= 'z' )
628  dv = *p - 'a' + 10;
629  else
630  dv = *p - 'A' + 10;
631  }
632  if ( val > max_mult || (val == max_mult && dv > (ULLONG_MAX%base)) )
633  goto bye;
634  val = base*val + dv;
635  p++;
636  }
637 
638  while ( l && isspace(*p) ) // skip trailing space
639  l--,p++;
640  if ( !l )
641  is_ok = TRUE;
642 bye:
643  if ( ok )
644  *ok = is_ok;
645  return is_ok ? val : 0;
646 }
647 
649 {
650  return setNum((long)n);
651 }
652 
654 {
655  return setNum((ulong)n);
656 }
657 
659 {
660  return setNum((long)n);
661 }
662 
664 {
665  return setNum((ulong)n);
666 }
667 
669 {
670  char buf[20];
671  char *p = &buf[19];
672  bool neg;
673  if ( n < 0 )
674  {
675  neg = TRUE;
676  n = -n;
677  }
678  else
679  {
680  neg = FALSE;
681  }
682  *p = '\0';
683  do
684  {
685  *--p = ((int)(n%10)) + '0';
686  n /= 10;
687  } while ( n );
688  if ( neg ) *--p = '-';
689  operator=( p );
690  return *this;
691 }
692 
694 {
695  char buf[20];
696  char *p = &buf[19];
697  *p = '\0';
698  do
699  {
700  *--p = ((int)(n%10)) + '0';
701  n /= 10;
702  } while ( n );
703  operator=( p );
704  return *this;
705 }
706 
707 //-------------------------------------------------
708 
709 void *qmemmove( void *dst, const void *src, uint len )
710 {
711  char *d;
712  char *s;
713  if ( dst > src ) {
714  d = (char *)dst + len - 1;
715  s = (char *)src + len - 1;
716  while ( len-- )
717  *d-- = *s--;
718  } else if ( dst < src ) {
719  d = (char *)dst;
720  s = (char *)src;
721  while ( len-- )
722  *d++ = *s++;
723  }
724  return dst;
725 }
726 
727 char *qstrdup( const char *str )
728 {
729  if ( !str )
730  return 0;
731  char *dst = new char[qstrlen(str)+1];
732  CHECK_PTR( dst );
733  return strcpy( dst, str );
734 }
735 
736 char *qstrncpy( char *dst, const char *src, uint len )
737 {
738  if ( !src )
739  return 0;
740  strncpy( dst, src, len );
741  if ( len > 0 )
742  dst[len-1] = '\0';
743  return dst;
744 }
745 
746 int qstricmp( const char *str1, const char *str2 )
747 {
748  const uchar *s1 = (const uchar *)str1;
749  const uchar *s2 = (const uchar *)str2;
750  int res;
751  uchar c;
752  if ( !s1 || !s2 )
753  return s1 == s2 ? 0 : (int)(s2 - s1);
754  for ( ; !(res = (c=tolower(*s1)) - tolower(*s2)); s1++, s2++ )
755  if ( !c ) // strings are equal
756  break;
757  return res;
758 }
759 
760 int qstrnicmp( const char *str1, const char *str2, uint len )
761 {
762  const uchar *s1 = (const uchar *)str1;
763  const uchar *s2 = (const uchar *)str2;
764  int res;
765  uchar c;
766  if ( !s1 || !s2 )
767  return (int)(s2 - s1);
768  for ( ; len--; s1++, s2++ ) {
769  if ( (res = (c=tolower(*s1)) - tolower(*s2)) )
770  return res;
771  if ( !c ) // strings are equal
772  break;
773  }
774  return 0;
775 }
776 
777 #ifndef QT_NO_DATASTREAM
778 
780 {
781  return s.writeBytes( a.data(), a.size() );
782 }
783 
785 {
786  Q_UINT32 len;
787  s >> len; // read size of array
788  if ( len == 0 || s.eof() ) { // end of file reached
789  a.resize( 0 );
790  return s;
791  }
792  if ( !a.resize( (uint)len ) ) { // resize array
793 #if defined(CHECK_NULL)
794  qWarning( "QDataStream: Not enough memory to read QByteArray" );
795 #endif
796  len = 0;
797  }
798  if ( len > 0 ) // not null array
799  s.readRawBytes( a.data(), (uint)len );
800  return s;
801 }
802 
804 {
805  return s.writeBytes( str.data(), str.size() );
806 }
807 
809 {
810  Q_UINT32 len;
811  s >> len; // read size of string
812  if ( len == 0 || s.eof() ) { // end of file reached
813  str.resize( 0 );
814  return s;
815  }
816  if ( !str.resize( (uint)len )) {// resize string
817 #if defined(CHECK_NULL)
818  qWarning( "QDataStream: Not enough memory to read QCString" );
819 #endif
820  len = 0;
821  }
822  if ( len > 0 ) // not null array
823  s.readRawBytes( str.rawData(), (uint)len );
824  return s;
825 }
826 
827 #endif //QT_NO_DATASTREAM
828 
829 inline QCString operator+( const QCString &s1, const QGString &s2 )
830 {
831  QCString tmp(s1);
832  tmp += s2.data();
833  return tmp;
834 }
835 
836 inline QCString operator+( const QGString &s1, const QCString &s2 )
837 {
838  QCString tmp(s1.data());
839  tmp += s2;
840  return tmp;
841 }
842 
QDate::operator>>
QDataStream & operator>>(QDataStream &s, QDate &d)
Definition: qdatetime.cpp:1396
QCString::replace
QCString & replace(uint index, uint len, const char *s)
Definition: qcstring.cpp:439
QRegExp
Definition of QRegExp class.
Definition: qregexp.h:47
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition: qcstring.h:191
QCString::rawData
char * rawData() const
Returns a writable pointer to the data.
Definition: qcstring.h:218
QCString::setNum
QCString & setNum(short n)
Definition: qcstring.cpp:648
qstrncpy
char * qstrncpy(char *dst, const char *src, uint len)
Definition: qcstring.cpp:736
QCString::remove
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:419
QCString::append
QCString & append(const char *s)
Definition: qcstring.cpp:411
qstrdup
char * qstrdup(const char *str)
Definition: qcstring.cpp:727
uint
unsigned uint
Definition: qglobal.h:351
qstrnicmp
int qstrnicmp(const char *str1, const char *str2, uint len)
Definition: qcstring.cpp:760
qWarning
void qWarning(const char *msg,...)
Definition: qglobal.cpp:409
QCString::toULong
ulong toULong(bool *ok=0, int base=10) const
Definition: qcstring.cpp:560
QDataStream
Definition of QDataStream class.
Definition: qdatastream.h:48
QCString::findRev
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:97
qregexp.h
QCString::insert
QCString & insert(uint index, const char *s)
Definition: qcstring.cpp:383
QCString::resize
bool resize(uint newlen)
Resizes the string to hold newlen characters (this value should include the 0-terminator).
Definition: qcstring.h:227
QGString
Fixes and workarounds for some platforms.
Definition: qgstring.h:20
QCString::simplifyWhiteSpace
QCString simplifyWhiteSpace() const
Definition: qcstring.cpp:351
qgstring.h
QArray::data
type * data() const
Definition: qarray.h:63
QCString::lower
QCString lower() const
Definition: qcstring.cpp:291
QCString::startsWith
bool startsWith(const char *s) const
Definition: qcstring.cpp:221
QCString::length
uint length() const
Returns the length of the string, excluding the 0-terminator.
Definition: qcstring.h:197
languages.l
l
Definition: languages.py:75
qmemmove
void * qmemmove(void *dst, const void *src, uint len)
Fixes and workarounds for some platforms.
Definition: qcstring.cpp:709
qcstring.h
QCString::operator=
QCString & operator=(const QCString &s)
replaces the contents by that of string s.
Definition: qcstring.h:171
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:134
qstring.h
QCString::assign
QCString & assign(const char *str)
Definition: qcstring.cpp:378
QCString::find
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:42
QCString::size
uint size() const
Returns the length of the string, excluding the 0-terminator.
Definition: qcstring.h:203
TRUE
@ TRUE
Definition: mscgen_bool.h:29
QCString::operator+=
QCString & operator+=(const char *str)
Appends string str to this string and returns a reference to the result.
Definition: qcstring.h:309
FALSE
@ FALSE
Definition: mscgen_bool.h:28
QString::operator+
QString operator+(const QString &s1, const QString &s2)
Definition: qstring.h:807
QDate::operator<<
QDataStream & operator<<(QDataStream &s, const QDate &d)
Date/time stream functions.
Definition: qdatetime.cpp:1384
QCString::contains
int contains(char c, bool cs=TRUE) const
Definition: qcstring.cpp:163
QCString::mid
QCString mid(uint index, uint len=(uint) -1) const
Definition: qcstring.cpp:274
QCString::toInt
int toInt(bool *ok=0, int base=10) const
Definition: qcstring.cpp:497
QCString::m_rep
StringRep m_rep
Definition: qcstring.h:698
uchar
unsigned char uchar
Definition: qglobal.h:349
QDataStream::readRawBytes
QDataStream & readRawBytes(char *, uint len)
Definition: qdatastream.cpp:669
QCString::toUInt
uint toUInt(bool *ok=0, int base=10) const
Definition: qcstring.cpp:502
qstricmp
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:746
QGString::data
char * data() const
Definition: qgstring.h:42
qstrncmp
int qstrncmp(const char *str1, const char *str2, uint len)
Definition: qcstring.h:103
qdatastream.h
QCString::right
QCString right(uint len) const
Definition: qcstring.cpp:259
QCString::stripWhiteSpace
QCString stripWhiteSpace() const
Definition: qcstring.cpp:323
QCString::toShort
short toShort(bool *ok=0, int base=10) const
Definition: qcstring.cpp:477
CHECK_PTR
#define CHECK_PTR(p)
Definition: qglobal.h:602
Q_UINT32
unsigned int Q_UINT32
Definition: qglobal.h:422
QCString::left
QCString left(uint len) const
Definition: qcstring.cpp:241
QDataStream::writeBytes
QDataStream & writeBytes(const char *, uint len)
Definition: qdatastream.cpp:914
QCString::toUShort
ushort toUShort(bool *ok=0, int base=10) const
Definition: qcstring.cpp:487
QCString::upper
QCString upper() const
Definition: qcstring.cpp:307
format
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
Definition: qstring.cpp:11496
ushort
unsigned short ushort
Definition: qglobal.h:350
QDataStream::eof
bool eof() const
Definition: qdatastream.h:129
ulong
unsigned long ulong
Definition: qglobal.h:352
uint64
unsigned long long uint64
Definition: qglobal.h:363
QByteArray
The QByteArray class provides an array of bytes.
QCString::stripPrefix
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:229
QCString::data
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition: qcstring.h:209
QCString::prepend
QCString & prepend(const char *s)
Definition: qcstring.cpp:415
QCString::toLong
long toLong(bool *ok=0, int base=10) const
Definition: qcstring.cpp:508
QCString::toUInt64
uint64 toUInt64(bool *ok=0, int base=10) const
Definition: qcstring.cpp:604
QCString::QCString
QCString()
creates an empty string
Definition: qcstring.h:137
languages.tmp
string tmp
Definition: languages.py:63
cs
const char * cs
Definition: qtextcodec.cpp:1350
QArray::resize
bool resize(uint size)
Definition: qarray.h:69
qstrlen
uint qstrlen(const char *str)
Definition: qcstring.h:83
QCString::sprintf
QCString & sprintf(const char *format,...)
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition: qcstring.cpp:28
QArray::size
uint size() const
Definition: qarray.h:65
ok_in_base
static bool ok_in_base(char c, int base)
Definition: qcstring.cpp:467
QRegExp::match
int match(const QCString &str, int index=0, int *len=0, bool indexIsStart=TRUE) const
Definition: qregexp.cpp:649