1 /****************************************************************************
4 ** Definition of the QString class, and related Unicode
9 ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
11 ** This file is part of the tools module of the Qt GUI Toolkit.
13 ** This file may be distributed under the terms of the Q Public License
14 ** as defined by Trolltech AS of Norway and appearing in the file
15 ** LICENSE.QPL included in the packaging of this file.
17 ** This file may be distributed and/or modified under the terms of the
18 ** GNU General Public License version 2 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.GPL included in the
20 ** packaging of this file.
22 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
23 ** licenses may use this file in accordance with the Qt Commercial License
24 ** Agreement provided with the Software.
26 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
27 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
30 ** information about Qt Commercial License Agreements.
31 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
32 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
34 ** Contact info@trolltech.com if any conditions of this licensing are
37 **********************************************************************/
46 #define QT_NO_ASCII_CAST
48 /*****************************************************************************
50 *****************************************************************************/
56 class Q_EXPORT Q_PACKED QChar {
61 QChar( uchar c, uchar r );
62 QChar( const QChar& c );
68 QT_STATIC_CONST QChar null; // 0000
69 QT_STATIC_CONST QChar replacement; // FFFD
70 QT_STATIC_CONST QChar byteOrderMark; // FEFF
71 QT_STATIC_CONST QChar byteOrderSwapped; // FFFE
72 QT_STATIC_CONST QChar nbsp; // 00A0
74 // Unicode information
80 Mark_NonSpacing, // Mn
81 Mark_SpacingCombining, // Mc
84 Number_DecimalDigit, // Nd
88 Separator_Space, // Zs
90 Separator_Paragraph, // Zp
94 Other_Surrogate, // Cs
95 Other_PrivateUse, // Co
96 Other_NotAssigned, // Cn
98 Letter_Uppercase, // Lu
99 Letter_Lowercase, // Ll
100 Letter_Titlecase, // Lt
101 Letter_Modifier, // Lm
104 Punctuation_Connector, // Pc
105 Punctuation_Dask, // Pd
106 Punctuation_Open, // Ps
107 Punctuation_Close, // Pe
108 Punctuation_InitialQuote, // Pi
109 Punctuation_FinalQuote, // Pf
110 Punctuation_Other, // Po
113 Symbol_Currency, // Sc
114 Symbol_Modifier, // Sk
120 DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,
121 DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN
126 Single, Canonical, Font, NoBreak, Initial, Medial,
127 Final, Isolated, Circle, Super, Sub, Vertical,
128 Wide, Narrow, Small, Square, Compat, Fraction
133 OtherJoining, Dual, Right, Center
136 // ****** WHEN ADDING FUNCTIONS, CONSIDER ADDING TO QCharRef TOO
138 int digitValue() const;
142 Category category() const;
143 Direction direction() const;
144 Joining joining() const;
145 bool mirrored() const;
146 QChar mirroredChar() const;
147 QString decomposition() const;
148 Decomposition decompositionTag() const;
150 char latin1() const { return rw ? 0 : cl; }
151 ushort unicode() const { return (rw << 8) | cl; }
152 #ifndef QT_NO_CAST_ASCII
153 // like all ifdef'd code this is undocumented
154 operator char() const { return latin1(); }
157 bool isNull() const { return unicode()==0; }
158 bool isPrint() const;
159 bool isPunct() const;
160 bool isSpace() const;
162 bool isLetter() const;
163 bool isNumber() const;
164 bool isLetterOrNumber() const;
165 bool isDigit() const;
167 uchar& cell() { return cl; }
168 uchar& row() { return rw; }
169 uchar cell() const { return cl; }
170 uchar row() const { return rw; }
172 static bool networkOrdered() { return (int)net_ordered == 1; }
174 friend inline int operator==( char ch, QChar c );
175 friend inline int operator==( QChar c, char ch );
176 friend inline int operator==( QChar c1, QChar c2 );
177 friend inline int operator!=( QChar c1, QChar c2 );
178 friend inline int operator!=( char ch, QChar c );
179 friend inline int operator!=( QChar c, char ch );
180 friend inline int operator<=( QChar c, char ch );
181 friend inline int operator<=( char ch, QChar c );
182 friend inline int operator<=( QChar c1, QChar c2 );
185 #if defined(_WS_X11_) || defined(_OS_WIN32_BYTESWAP_) || defined( _WS_QWS_ )
186 // XChar2b on X11, ushort on _OS_WIN32_BYTESWAP_
187 //### QWS must be defined on a platform by platform basis
190 #if defined(QT_QSTRING_UCS_4)
193 enum { net_ordered = 1 };
195 // ushort on _OS_WIN32_
198 #if defined(QT_QSTRING_UCS_4)
201 enum { net_ordered = 0 };
205 inline QChar::QChar()
208 #ifdef QT_QSTRING_UCS_4
212 inline QChar::QChar( char c )
214 rw = 0; cl = (uchar)c;
215 #ifdef QT_QSTRING_UCS_4
219 inline QChar::QChar( uchar c )
222 #ifdef QT_QSTRING_UCS_4
226 inline QChar::QChar( uchar c, uchar r )
229 #ifdef QT_QSTRING_UCS_4
233 inline QChar::QChar( const QChar& c )
235 rw = c.rw; cl = c.cl;
236 #ifdef QT_QSTRING_UCS_4
240 inline QChar::QChar( ushort rc )
242 rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
243 #ifdef QT_QSTRING_UCS_4
247 inline QChar::QChar( short rc )
249 rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
250 #ifdef QT_QSTRING_UCS_4
254 inline QChar::QChar( uint rc )
256 rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
257 #ifdef QT_QSTRING_UCS_4
261 inline QChar::QChar( int rc )
263 rw = (uchar)((rc>>8)&0xff); cl = (uchar)(rc&0xff);
264 #ifdef QT_QSTRING_UCS_4
270 inline int operator==( char ch, QChar c )
272 return ch == c.cl && !c.rw;
275 inline int operator==( QChar c, char ch )
277 return ch == c.cl && !c.rw;
280 inline int operator==( QChar c1, QChar c2 )
282 return c1.cl == c2.cl
286 inline int operator!=( QChar c1, QChar c2 )
288 return c1.cl != c2.cl
292 inline int operator!=( char ch, QChar c )
294 return ch != c.cl || c.rw;
297 inline int operator!=( QChar c, char ch )
299 return ch != c.cl || c.rw;
302 inline int operator<=( QChar c, char ch )
304 return !(ch < c.cl || c.rw);
307 inline int operator<=( char ch, QChar c )
309 return ch <= c.cl || c.rw;
312 inline int operator<=( QChar c1, QChar c2 )
321 inline int operator>=( QChar c, char ch ) { return ch <= c; }
322 inline int operator>=( char ch, QChar c ) { return c <= ch; }
323 inline int operator>=( QChar c1, QChar c2 ) { return c2 <= c1; }
324 inline int operator<( QChar c, char ch ) { return !(ch<=c); }
325 inline int operator<( char ch, QChar c ) { return !(c<=ch); }
326 inline int operator<( QChar c1, QChar c2 ) { return !(c2<=c1); }
327 inline int operator>( QChar c, char ch ) { return !(ch>=c); }
328 inline int operator>( char ch, QChar c ) { return !(c>=ch); }
329 inline int operator>( QChar c1, QChar c2 ) { return !(c2>=c1); }
332 struct Q_EXPORT QStringData : public QShared {
334 unicode(0), ascii(0), len(0), maxl(0), dirtyascii(0) { ref(); }
335 QStringData(QChar *u, uint l, uint m) :
336 unicode(u), ascii(0), len(l), maxl(m), dirtyascii(0) { }
338 ~QStringData() { if ( unicode ) delete[] ((char*)unicode);
339 if ( ascii ) delete[] ascii; }
350 class Q_EXPORT QString
353 QString(); // make null string
354 QString( QChar ); // one-char string
355 QString( const QString & ); // impl-shared copy
356 QString( const QByteArray& ); // deep copy
357 QString( const QCString& ); // deep copy
358 QString( const QChar* unicode, uint length ); // deep copy
359 #ifndef QT_NO_CAST_ASCII
360 QString( const char *str ); // deep copy
364 QString &operator=( const QString & ); // impl-shared copy
365 #ifndef QT_NO_CAST_ASCII
366 QString &operator=( const char * ); // deep copy
368 QString &operator=( const QCString& ); // deep copy
369 QString &operator=( QChar c );
370 QString &operator=( char c );
372 //QT_STATIC_CONST QString null;
373 //bool isNull() const;
376 static const Null null;
377 inline QString(const Null &): d(shared_null) { d->ref(); }
378 inline QString &operator=(const Null &) { *this = QString(); return *this; }
379 inline bool isNull() const { return d == shared_null; }
381 bool isEmpty() const;
383 void truncate( uint pos );
385 #if QT_VERSION >= 300
386 #error "fill() Should return *this, or QChar constructor should take count=1"
388 void fill( QChar c, int len = -1 );
390 QString copy() const;
392 QString arg(long a, int fieldwidth=0, int base=10) const;
393 QString arg(ulong a, int fieldwidth=0, int base=10) const;
394 QString arg(int a, int fieldwidth=0, int base=10) const;
395 QString arg(uint a, int fieldwidth=0, int base=10) const;
396 QString arg(short a, int fieldwidth=0, int base=10) const;
397 QString arg(ushort a, int fieldwidth=0, int base=10) const;
398 QString arg(char a, int fieldwidth=0) const;
399 QString arg(QChar a, int fieldwidth=0) const;
400 QString arg(const QString& a, int fieldwidth=0) const;
401 QString arg(double a, int fieldwidth=0, char fmt='g', int prec=-1) const;
403 QString &sprintf( const char* format, ... )
404 #if defined(_CC_GNU_) && !defined(__INSURE__)
405 __attribute__ ((format (printf, 2, 3)))
409 int find( QChar c, int index=0, bool cs=TRUE ) const;
410 int find( char c, int index=0, bool cs=TRUE ) const;
411 int find( const QString &str, int index=0, bool cs=TRUE ) const;
412 int find( const QRegExp &, int index=0 ) const;
413 #ifndef QT_NO_CAST_ASCII
414 int find( const char* str, int index=0 ) const;
416 int findRev( QChar c, int index=-1, bool cs=TRUE) const;
417 int findRev( char c, int index=-1, bool cs=TRUE) const;
418 int findRev( const QString &str, int index=-1, bool cs=TRUE) const;
419 int findRev( const QRegExp &, int index=-1 ) const;
420 #ifndef QT_NO_CAST_ASCII
421 int findRev( const char* str, int index=-1 ) const;
423 int contains( QChar c, bool cs=TRUE ) const;
424 int contains( char c, bool cs=TRUE ) const
425 { return contains(QChar(c), cs); }
426 #ifndef QT_NO_CAST_ASCII
427 int contains( const char* str, bool cs=TRUE ) const;
429 int contains( const QString &str, bool cs=TRUE ) const;
430 int contains( const QRegExp & ) const;
432 QString left( uint len ) const;
433 QString right( uint len ) const;
434 QString mid( uint index, uint len=0xffffffff) const;
436 QString leftJustify( uint width, QChar fill=' ', bool trunc=FALSE)const;
437 QString rightJustify( uint width, QChar fill=' ',bool trunc=FALSE)const;
439 QString lower() const;
440 QString upper() const;
442 QString stripWhiteSpace() const;
443 QString simplifyWhiteSpace() const;
445 QString &insert( uint index, const QString & );
446 QString &insert( uint index, const QChar*, uint len );
447 QString &insert( uint index, QChar );
448 QString &insert( uint index, char c ) { return insert(index,QChar(c)); }
449 QString &append( char );
450 QString &append( QChar );
451 QString &append( const QString & );
452 QString &prepend( char );
453 QString &prepend( QChar );
454 QString &prepend( const QString & );
455 QString &remove( uint index, uint len );
456 QString &replace( uint index, uint len, const QString & );
457 QString &replace( uint index, uint len, const QChar*, uint clen );
458 QString &replace( const QRegExp &, const QString & );
460 short toShort( bool *ok=0, int base=10 ) const;
461 ushort toUShort( bool *ok=0, int base=10 ) const;
462 int toInt( bool *ok=0, int base=10 ) const;
463 uint toUInt( bool *ok=0, int base=10 ) const;
464 long toLong( bool *ok=0, int base=10 ) const;
465 ulong toULong( bool *ok=0, int base=10 ) const;
466 uint64 toUInt64( bool *ok=0, int base=10 ) const;
467 float toFloat( bool *ok=0 ) const;
468 double toDouble( bool *ok=0 ) const;
470 QString &setNum( short, int base=10 );
471 QString &setNum( ushort, int base=10 );
472 QString &setNum( int, int base=10 );
473 QString &setNum( uint, int base=10 );
474 QString &setNum( long, int base=10 );
475 QString &setNum( ulong, int base=10 );
476 QString &setNum( float, char f='g', int prec=6 );
477 QString &setNum( double, char f='g', int prec=6 );
479 static QString number( long, int base=10 );
480 static QString number( ulong, int base=10);
481 static QString number( int, int base=10 );
482 static QString number( uint, int base=10);
483 static QString number( double, char f='g', int prec=6 );
485 void setExpand( uint index, QChar c );
487 QString &operator+=( const QString &str );
488 QString &operator+=( QChar c );
489 QString &operator+=( char c );
491 // Your compiler is smart enough to use the const one if it can.
492 QChar at( uint i ) const
493 { return i<d->len ? d->unicode[i] : QChar::null; }
494 QChar operator[]( int i ) const { return at((uint)i); }
495 QCharRef at( uint i );
496 QCharRef operator[]( int i );
498 QChar constref(uint i) const
501 { // Optimized for easy-inlining by simple compilers.
502 if (d->count!=1 || i>=d->len)
505 return d->unicode[i];
508 const QChar* unicode() const { return d->unicode; }
509 const char* ascii() const;
510 const char* latin1() const;
511 static QString fromLatin1(const char*, int len=-1);
512 const unsigned short *ucs2() const;
513 static QString fromUcs2( const unsigned short *ucs2 );
514 #ifndef QT_NO_TEXTCODEC
515 QCString utf8() const;
516 static QString fromUtf8(const char*, int len=-1);
518 QCString local8Bit() const;
519 static QString fromLocal8Bit(const char*, int len=-1);
520 bool operator!() const;
521 #ifndef QT_NO_ASCII_CAST
522 operator const char *() const { return latin1(); }
525 QString &setUnicode( const QChar* unicode, uint len );
526 QString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len );
527 QString &setLatin1( const char*, int len=-1 );
529 int compare( const QString& s ) const;
530 static int compare( const QString& s1, const QString& s2 )
531 { return s1.compare(s2); }
533 #ifndef QT_NO_DATASTREAM
534 friend Q_EXPORT QDataStream &operator>>( QDataStream &, QString & );
536 // new functions for BiDi
538 QChar::Direction basicDirection();
539 QString visual(int index = 0, int len = -1);
542 const char* data() const { return latin1(); }
545 bool startsWith( const QString& ) const;
548 QString( int size, bool dummy ); // allocate size incl. \0
552 void setLength( uint pos );
554 bool findArg(int& pos, int& len) const;
556 static QChar* asciiToUnicode( const char*, uint * len, uint maxlen=(uint)-1 );
557 static QChar* asciiToUnicode( const QByteArray&, uint * len );
558 static char* unicodeToAscii( const QChar*, uint len );
561 static QStringData* shared_null;
562 static QStringData* makeSharedNull();
564 friend class QConstString;
565 QString(QStringData* dd, bool /*dummy*/) : d(dd) { }
568 class Q_EXPORT QCharRef {
569 friend class QString;
572 QCharRef(QString* str, uint pos) : s(*str), p(pos) { }
575 // Most QChar operations repeated here...
577 // all this is not documented: We just say "like QChar" and let it be.
579 ushort unicode() const { return s.constref(p).unicode(); }
580 char latin1() const { return s.constref(p).latin1(); }
582 // An operator= for each QChar cast constructor...
583 QCharRef operator=(char c ) { s.ref(p)=c; return *this; }
584 QCharRef operator=(uchar c ) { s.ref(p)=c; return *this; }
585 QCharRef operator=(QChar c ) { s.ref(p)=c; return *this; }
586 QCharRef operator=(const QCharRef& c ) { s.ref(p)=c.unicode(); return *this; }
587 QCharRef operator=(ushort rc ) { s.ref(p)=rc; return *this; }
588 QCharRef operator=(short rc ) { s.ref(p)=rc; return *this; }
589 QCharRef operator=(uint rc ) { s.ref(p)=rc; return *this; }
590 QCharRef operator=(int rc ) { s.ref(p)=rc; return *this; }
592 operator QChar () const { return s.constref(p); }
595 bool isNull() const { return unicode()==0; }
596 bool isPrint() const { return s.constref(p).isPrint(); }
597 bool isPunct() const { return s.constref(p).isPunct(); }
598 bool isSpace() const { return s.constref(p).isSpace(); }
599 bool isMark() const { return s.constref(p).isMark(); }
600 bool isLetter() const { return s.constref(p).isLetter(); }
601 bool isNumber() const { return s.constref(p).isNumber(); }
602 bool isLetterOrNumber() { return s.constref(p).isLetterOrNumber(); }
603 bool isDigit() const { return s.constref(p).isDigit(); }
605 int digitValue() const { return s.constref(p).digitValue(); }
606 QChar lower() { return s.constref(p).lower(); }
607 QChar upper() { return s.constref(p).upper(); }
609 QChar::Category category() const { return s.constref(p).category(); }
610 QChar::Direction direction() const { return s.constref(p).direction(); }
611 QChar::Joining joining() const { return s.constref(p).joining(); }
612 bool mirrored() const { return s.constref(p).mirrored(); }
613 QChar mirroredChar() const { return s.constref(p).mirroredChar(); }
614 QString decomposition() const { return s.constref(p).decomposition(); }
615 QChar::Decomposition decompositionTag() const { return s.constref(p).decompositionTag(); }
617 // Not the non-const ones of these.
618 uchar cell() const { return s.constref(p).cell(); }
619 uchar row() const { return s.constref(p).row(); }
623 inline QCharRef QString::at( uint i ) { return QCharRef(this,i); }
624 inline QCharRef QString::operator[]( int i ) { return at((uint)i); }
627 class Q_EXPORT QConstString : private QString {
629 QConstString( QChar* unicode, uint length );
631 const QString& string() const { return *this; }
635 /*****************************************************************************
636 QString stream functions
637 *****************************************************************************/
638 #ifndef QT_NO_DATASTREAM
639 Q_EXPORT QDataStream &operator<<( QDataStream &, const QString & );
640 Q_EXPORT QDataStream &operator>>( QDataStream &, QString & );
643 /*****************************************************************************
644 QString inline functions
645 *****************************************************************************/
647 // These two move code into makeSharedNull() and deletesData()
648 // to improve cache-coherence (and reduce code bloat), while
649 // keeping the common cases fast.
651 // No safe way to pre-init shared_null on ALL compilers/linkers.
652 inline QString::QString() :
653 d(shared_null ? shared_null : makeSharedNull())
658 inline QString::~QString()
661 if ( d == shared_null )
667 inline QString &QString::operator=( QChar c )
668 { return *this = QString(c); }
670 inline QString &QString::operator=( char c )
671 { return *this = QString(QChar(c)); }
673 //inline bool QString::isNull() const
674 //{ return unicode() == 0; }
676 inline bool QString::operator!() const
679 inline uint QString::length() const
682 inline bool QString::isEmpty() const
683 { return length() == 0; }
685 inline QString QString::copy() const
686 { return QString( *this ); }
688 inline QString &QString::prepend( const QString & s )
689 { return insert(0,s); }
691 inline QString &QString::prepend( QChar c )
692 { return insert(0,c); }
694 inline QString &QString::prepend( char c )
695 { return insert(0,c); }
697 inline QString &QString::append( const QString & s )
698 { return operator+=(s); }
700 inline QString &QString::append( QChar c )
701 { return operator+=(c); }
703 inline QString &QString::append( char c )
704 { return operator+=(c); }
706 inline QString &QString::setNum( short n, int base )
707 { return setNum((long)n, base); }
709 inline QString &QString::setNum( ushort n, int base )
710 { return setNum((ulong)n, base); }
712 inline QString &QString::setNum( int n, int base )
713 { return setNum((long)n, base); }
715 inline QString &QString::setNum( uint n, int base )
716 { return setNum((ulong)n, base); }
718 inline QString &QString::setNum( float n, char f, int prec )
719 { return setNum((double)n,f,prec); }
721 inline QString QString::arg(int a, int fieldwidth, int base) const
722 { return arg((long)a, fieldwidth, base); }
724 inline QString QString::arg(uint a, int fieldwidth, int base) const
725 { return arg((ulong)a, fieldwidth, base); }
727 inline QString QString::arg(short a, int fieldwidth, int base) const
728 { return arg((long)a, fieldwidth, base); }
730 inline QString QString::arg(ushort a, int fieldwidth, int base) const
731 { return arg((ulong)a, fieldwidth, base); }
733 inline int QString::find( char c, int index, bool cs ) const
734 { return find(QChar(c), index, cs); }
736 inline int QString::findRev( char c, int index, bool cs) const
737 { return findRev( QChar(c), index, cs ); }
740 #ifndef QT_NO_CAST_ASCII
741 inline int QString::find( const char* str, int index ) const
742 { return find(QString::fromLatin1(str), index); }
744 inline int QString::findRev( const char* str, int index ) const
745 { return findRev(QString::fromLatin1(str), index); }
749 /*****************************************************************************
750 QString non-member operators
751 *****************************************************************************/
753 Q_EXPORT bool operator!=( const QString &s1, const QString &s2 );
754 Q_EXPORT bool operator<( const QString &s1, const QString &s2 );
755 Q_EXPORT bool operator<=( const QString &s1, const QString &s2 );
756 Q_EXPORT bool operator==( const QString &s1, const QString &s2 );
757 Q_EXPORT bool operator>( const QString &s1, const QString &s2 );
758 Q_EXPORT bool operator>=( const QString &s1, const QString &s2 );
759 #ifndef QT_NO_CAST_ASCII
760 Q_EXPORT bool operator!=( const QString &s1, const char *s2 );
761 Q_EXPORT bool operator<( const QString &s1, const char *s2 );
762 Q_EXPORT bool operator<=( const QString &s1, const char *s2 );
763 Q_EXPORT bool operator==( const QString &s1, const char *s2 );
764 Q_EXPORT bool operator>( const QString &s1, const char *s2 );
765 Q_EXPORT bool operator>=( const QString &s1, const char *s2 );
766 Q_EXPORT bool operator!=( const char *s1, const QString &s2 );
767 Q_EXPORT bool operator<( const char *s1, const QString &s2 );
768 Q_EXPORT bool operator<=( const char *s1, const QString &s2 );
769 Q_EXPORT bool operator==( const char *s1, const QString &s2 );
770 //Q_EXPORT bool operator>( const char *s1, const QString &s2 ); // MSVC++
771 Q_EXPORT bool operator>=( const char *s1, const QString &s2 );
774 Q_EXPORT inline QString operator+( const QString &s1, const QString &s2 )
781 #ifndef QT_NO_CAST_ASCII
782 Q_EXPORT inline QString operator+( const QString &s1, const char *s2 )
785 tmp += QString::fromLatin1(s2);
789 Q_EXPORT inline QString operator+( const char *s1, const QString &s2 )
791 QString tmp = QString::fromLatin1( s1 );
797 Q_EXPORT inline QString operator+( const QString &s1, QChar c2 )
804 Q_EXPORT inline QString operator+( const QString &s1, char c2 )
811 Q_EXPORT inline QString operator+( QChar c1, const QString &s2 )
819 Q_EXPORT inline QString operator+( char c1, const QString &s2 )
827 #if defined(_OS_WIN32_)
828 extern Q_EXPORT QString qt_winQString(void*);
829 extern Q_EXPORT const void* qt_winTchar(const QString& str, bool addnul);
830 extern Q_EXPORT void* qt_winTchar_new(const QString& str);
831 extern Q_EXPORT QCString qt_winQString2MB( const QString& s, int len=-1 );
832 extern Q_EXPORT QString qt_winMB2QString( const char* mb, int len=-1 );