⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qstring-h.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Qt Toolkit - qstring.h include file</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }--></style></head><body bgcolor="#ffffff"><table width="100%"><tr><td><a href="index.html"><img width="100" height="100" src="qtlogo.png"alt="Home" border="0"><img width="100"height="100" src="face.png" alt="Home" border="0"></a><td valign="top"><div align="right"><img src="dochead.png" width="472" height="27"><br><a href="classes.html"><b>Classes</b></a>- <a href="annotated.html">Annotated</a>- <a href="hierarchy.html">Tree</a>- <a href="functions.html">Functions</a>- <a href="index.html">Home</a>- <a href="topicals.html"><b>Structure</b>  <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qte</font></a></div></table><h1 align=center>qstring.h</h1><br clear="all">This is the verbatim text of the qstring.h include file.  It isprovided only for illustration; the copyrightremains with Trolltech.<hr><pre>/****************************************************************************** &#36;Id&#58; qt/src/tools/qstring.h   2.3.8   edited 2004-05-12 $**** Definition of the QString class, and related Unicode** functions.**** Created : 920609**** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.**** This file is part of the tools module of the Qt GUI Toolkit.**** This file may be distributed under the terms of the Q Public License** as defined by Trolltech AS of Norway and appearing in the file** LICENSE.QPL included in the packaging of this file.**** This file may be distributed and/or modified under the terms of the** GNU General Public License version 2 as published by the Free Software** Foundation and appearing in the file LICENSE.GPL included in the** packaging of this file.**** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition** licenses may use this file in accordance with the Qt Commercial License** Agreement provided with the Software.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for**   information about Qt Commercial License Agreements.** See http://www.trolltech.com/qpl/ for QPL licensing information.** See http://www.trolltech.com/gpl/ for GPL licensing information.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.************************************************************************/#ifndef QSTRING_H#define QSTRING_H#ifndef QT_H#include "qcstring.h"#endif // QT_H/*****************************************************************************  QString class *****************************************************************************/class <a href="qregexp.html">QRegExp</a>;class <a href="qstring.html">QString</a>;class <a href="qcharref.html">QCharRef</a>;class Q_EXPORT <a href="qchar.html">QChar</a> {public:    QChar();    QChar( char c );    QChar( uchar c );    QChar( uchar c, uchar r );    QChar( const QChar&amp; c );    QChar( ushort rc );    QChar( short rc );    QChar( uint rc );    QChar( int rc );    QT_STATIC_CONST QChar null;            // 0000    QT_STATIC_CONST QChar replacement;     // FFFD    QT_STATIC_CONST QChar byteOrderMark;     // FEFF    QT_STATIC_CONST QChar byteOrderSwapped;     // FFFE    QT_STATIC_CONST QChar nbsp;            // 00A0    // Unicode information    enum Category    {        NoCategory,        Mark_NonSpacing,          //   Mn        Mark_SpacingCombining,    //   Mc        Mark_Enclosing,           //   Me        Number_DecimalDigit,      //   Nd        Number_Letter,            //   Nl        Number_Other,             //   No        Separator_Space,          //   Zs        Separator_Line,           //   Zl        Separator_Paragraph,      //   Zp        Other_Control,            //   Cc        Other_Format,             //   Cf        Other_Surrogate,          //   Cs        Other_PrivateUse,         //   Co        Other_NotAssigned,        //   Cn        Letter_Uppercase,         //   Lu        Letter_Lowercase,         //   Ll        Letter_Titlecase,         //   Lt        Letter_Modifier,          //   Lm        Letter_Other,             //   Lo        Punctuation_Connector,    //   Pc        Punctuation_Dask,         //   Pd        Punctuation_Open,         //   Ps        Punctuation_Close,        //   Pe        Punctuation_InitialQuote, //   Pi        Punctuation_FinalQuote,   //   Pf        Punctuation_Other,        //   Po        Symbol_Math,              //   Sm        Symbol_Currency,          //   Sc        Symbol_Modifier,          //   Sk        Symbol_Other              //   So    };    enum Direction    {        DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,        DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN    };    enum Decomposition    {        Single, Canonical, Font, NoBreak, Initial, Medial,        Final, Isolated, Circle, Super, Sub, Vertical,        Wide, Narrow, Small, Square, Compat, Fraction    };    enum Joining    {        OtherJoining, Dual, Right, Center    };    // ****** WHEN ADDING FUNCTIONS, CONSIDER ADDING TO QCharRef TOO    int digitValue() const;    QChar lower() const;    QChar upper() const;    Category category() const;    Direction direction() const;    Joining joining() const;    bool mirrored() const;    QChar mirroredChar() const;    QString decomposition() const;    Decomposition decompositionTag() const;    char latin1() const { return rw ? 0 : cl; }    ushort unicode() const { return (rw &lt;&lt; 8) | cl; }#ifndef QT_NO_CAST_ASCII    // like all ifdef'd code this is undocumented    operator char() const { return latin1(); }#endif    bool isNull() const { return unicode()==0; }    bool isPrint() const;    bool isPunct() const;    bool isSpace() const;    bool isMark() const;    bool isLetter() const;    bool isNumber() const;    bool isLetterOrNumber() const;    bool isDigit() const;    uchar&amp; cell() { return cl; }    uchar&amp; row() { return rw; }    uchar cell() const { return cl; }    uchar row() const { return rw; }    static bool networkOrdered() { return (int)net_ordered == 1; }    friend inline int operator==( char ch, QChar c );    friend inline int operator==( QChar c, char ch );    friend inline int operator==( QChar c1, QChar c2 );    friend inline int operator!=( QChar c1, QChar c2 );    friend inline int operator!=( char ch, QChar c );    friend inline int operator!=( QChar c, char ch );    friend inline int operator&lt;=( QChar c, char ch );    friend inline int operator&lt;=( char ch, QChar c );    friend inline int operator&lt;=( QChar c1, QChar c2 );private:#if defined(_WS_X11_) || defined(_OS_WIN32_BYTESWAP_) || defined( _WS_QWS_ )    // XChar2b on X11, ushort on _OS_WIN32_BYTESWAP_    //### QWS must be defined on a platform by platform basis    uchar rw;    uchar cl;#if defined(QT_QSTRING_UCS_4)    ushort grp;#endif    enum { net_ordered = 1 };#else    // ushort on _OS_WIN32_    uchar cl;    uchar rw;#if defined(QT_QSTRING_UCS_4)    ushort grp;#endif    enum { net_ordered = 0 };#endif} Q_PACKED;inline QChar::QChar(){    rw = 0; cl = 0;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( char c ){    rw = 0; cl = (uchar)c;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( uchar c ){    rw = 0; cl = c;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( uchar c, uchar r ){    rw = r; cl = c;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( const QChar&amp; c ){    rw = c.rw; cl = c.cl;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( ushort rc ){    rw = (uchar)((rc&gt;&gt;8)&amp;0xff); cl = (uchar)(rc&amp;0xff);#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( short rc ){    rw = (uchar)((rc&gt;&gt;8)&amp;0xff); cl = (uchar)(rc&amp;0xff);#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( uint rc ){    rw = (uchar)((rc&gt;&gt;8)&amp;0xff); cl = (uchar)(rc&amp;0xff);#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( int rc ){    rw = (uchar)((rc&gt;&gt;8)&amp;0xff); cl = (uchar)(rc&amp;0xff);#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline int operator==( char ch, QChar c ){    return ch == c.cl &amp;&amp; !c.rw;}inline int operator==( QChar c, char ch ){    return ch == c.cl &amp;&amp; !c.rw;}inline int operator==( QChar c1, QChar c2 ){    return c1.cl == c2.cl        &amp;&amp; c1.rw == c2.rw;}inline int operator!=( QChar c1, QChar c2 ){    return c1.cl != c2.cl        || c1.rw != c2.rw;}inline int operator!=( char ch, QChar c ){    return ch != c.cl || c.rw;}inline int operator!=( QChar c, char ch ){    return ch != c.cl || c.rw;}inline int operator&lt;=( QChar c, char ch ){    return !(ch &lt; c.cl || c.rw);}inline int operator&lt;=( char ch, QChar c ){    return ch &lt;= c.cl || c.rw;}inline int operator&lt;=( QChar c1, QChar c2 ){    return c1.rw &gt; c2.rw        ? FALSE        : c1.rw &lt; c2.rw            ? TRUE            : c1.cl &lt;= c2.cl;}inline int operator&gt;=( QChar c, char ch ) { return ch &lt;= c; }inline int operator&gt;=( char ch, QChar c ) { return c &lt;= ch; }inline int operator&gt;=( QChar c1, QChar c2 ) { return c2 &lt;= c1; }inline int operator&lt;( QChar c, char ch ) { return !(ch&lt;=c); }inline int operator&lt;( char ch, QChar c ) { return !(c&lt;=ch); }inline int operator&lt;( QChar c1, QChar c2 ) { return !(c2&lt;=c1); }inline int operator&gt;( QChar c, char ch ) { return !(ch&gt;=c); }inline int operator&gt;( char ch, QChar c ) { return !(c&gt;=ch); }inline int operator&gt;( QChar c1, QChar c2 ) { return !(c2&gt;=c1); }// internalstruct Q_EXPORT QStringData : public <a href="qshared.html">QShared</a> {    QStringData() :        unicode(0), ascii(0), len(0), maxl(0), dirtyascii(0) { ref(); }    QStringData(QChar *u, uint l, uint m) :        unicode(u), ascii(0), len(l), maxl(m), dirtyascii(0) { }    ~QStringData() { if ( unicode ) delete[] ((char*)unicode);                     if ( ascii ) delete[] ascii; }    void deleteSelf();    QChar *unicode;    char *ascii;    uint len;    uint maxl:30;    uint dirtyascii:1;};class Q_EXPORT <a href="qstring.html">QString</a>{public:    QString();                                  // make null string    QString( QChar );                           // one-char string    QString( const QString &amp; );                 // impl-shared copy    QString( const QByteArray&amp; );               // deep copy    QString( const QChar* unicode, uint length ); // deep copy#ifndef QT_NO_CAST_ASCII    QString( const char *str );                 // deep copy#endif    ~QString();    QString    &amp;operator=( const QString &amp; );   // impl-shared copy#ifndef QT_NO_CAST_ASCII    QString    &amp;operator=( const char * );      // deep copy#endif    QString    &amp;operator=( const QCString&amp; );   // deep copy    QString    &amp;operator=( QChar c );    QString    &amp;operator=( char c );    QT_STATIC_CONST QString null;    bool        isNull()        const;    bool        isEmpty()       const;    uint        length()        const;    void        truncate( uint pos );#if QT_VERSION &gt;= 300#error "fill() Should return *this, or QChar constructor should take count=1"#endif    void        fill( QChar c, int len = -1 );    QString     copy()  const;    QString arg(long a, int fieldwidth=0, int base=10) const;    QString arg(ulong a, int fieldwidth=0, int base=10) const;    QString arg(int a, int fieldwidth=0, int base=10) const;    QString arg(uint a, int fieldwidth=0, int base=10) const;    QString arg(short a, int fieldwidth=0, int base=10) const;    QString arg(ushort a, int fieldwidth=0, int base=10) const;    QString arg(char a, int fieldwidth=0) const;    QString arg(QChar a, int fieldwidth=0) const;    QString arg(const QString&amp; a, int fieldwidth=0) const;    QString arg(double a, int fieldwidth=0, char fmt='g', int prec=-1) const;    QString    &amp;sprintf( const char* format, ... )#if defined(_CC_GNU_) &amp;&amp; !defined(__INSURE__)        __attribute__ ((format (printf, 2, 3)))#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -