主页|所有的类|主要的类|注释的类|分组的类|函数QString类参考QString类提供了一个Unicode文本和经典的C以零结尾的字符数组的抽象。详情请见……#includeqstring.h所有成员函数的列表。公有成员QString()QString(QCharch)QString(constQString&s)QString(constQByteArray&ba)QString(constQChar*unicode,uintlength)QString(constchar*str)~QString()QString&operator=(constQString&s)QString&operator=(constchar*str)QString&operator=(constQCString&cs)QString&operator=(QCharc)QString&operator=(charc)boolisNull()constboolisEmpty()constuintlength()constvoidtruncate(uintnewLen)QString&fill(QCharc,intlen=-1)QStringcopy()const(obsolete)QStringarg(longa,intfieldwidth=0,intbase=10)constQStringarg(ulonga,intfieldwidth=0,intbase=10)constQStringarg(inta,intfieldwidth=0,intbase=10)constQStringarg(uinta,intfieldwidth=0,intbase=10)constQStringarg(shorta,intfieldwidth=0,intbase=10)constQStringarg(ushorta,intfieldwidth=0,intbase=10)constQStringarg(chara,intfieldwidth=0)constQStringarg(QChara,intfieldwidth=0)constQStringarg(constQString&a,intfieldwidth=0)constQStringarg(doublea,intfieldwidth=0,charfmt='g',intprec=-1)constQString&sprintf(constchar*cformat,...)intfind(QCharc,intindex=0,boolcs=TRUE)constintfind(charc,intindex=0,boolcs=TRUE)constintfind(constQString&str,intindex=0,boolcs=TRUE)constintfind(constQRegExp&rx,intindex=0)constintfind(constchar*str,intindex=0)constintfindRev(QCharc,intindex=-1,boolcs=TRUE)constintfindRev(charc,intindex=-1,boolcs=TRUE)constintfindRev(constQString&str,intindex=-1,boolcs=TRUE)constintfindRev(constQRegExp&rx,intindex=-1)constintfindRev(constchar*str,intindex=-1)constintcontains(QCharc,boolcs=TRUE)constintcontains(charc,boolcs=TRUE)constintcontains(constchar*str,boolcs=TRUE)constintcontains(constQString&str,boolcs=TRUE)constintcontains(constQRegExp&rx)constenumSectionFlags{SectionDefault=0x00,SectionSkipEmpty=0x01,SectionIncludeLeadingSep=0x02,SectionIncludeTrailingSep=0x04,SectionCaseInsensitiveSeps=0x08}QStringsection(QCharsep,intstart,intend=0xffffffff,intflags=SectionDefault)constQStringsection(charsep,intstart,intend=0xffffffff,intflags=SectionDefault)constQStringsection(constchar*sep,intstart,intend=0xffffffff,intflags=SectionDefault)constQStringsection(constQString&sep,intstart,intend=0xffffffff,intflags=SectionDefault)constQStringsection(constQRegExp®,intstart,intend=0xffffffff,intflags=SectionDefault)constQStringleft(uintlen)constQStringright(uintlen)constQStringmid(uintindex,uintlen=0xffffffff)constQStringleftJustify(uintwidth,QCharfill='',booltruncate=FALSE)constQStringrightJustify(uintwidth,QCharfill='',booltruncate=FALSE)constQStringlower()constQStringupper()constQStringstripWhiteSpace()constQStringsimplifyWhiteSpace()constQString&insert(uintindex,constQString&s)QString&insert(uintindex,constQChar*s,uintlen)QString&insert(uintindex,QCharc)QString&insert(uintindex,charc)QString&append(charch)QString&append(QCharch)QString&append(constQString&str)QString&prepend(charch)QString&prepend(QCharch)QString&prepend(constQString&s)QString&remove(uintindex,uintlen)QString&replace(uintindex,uintlen,constQString&s)QString&replace(uintindex,uintlen,constQChar*s,uintslen)QString&replace(constQRegExp&rx,constQString&str)shorttoShort(bool*ok=0,intbase=10)constushorttoUShort(bool*ok=0,intbase=10)constinttoInt(bool*ok=0,intbase=10)constuinttoUInt(bool*ok=0,intbase=10)constlongtoLong(bool*ok=0,intbase=10)constulongtoULong(bool*ok=0,intbase=10)constfloattoFloat(bool*ok=0)constdoubletoDouble(bool*ok=0)constQString&setNum(shortn,intbase=10)QString&setNum(ushortn,intbase=10)QString&setNum(intn,intbase=10)QString&setNum(uintn,intbase=10)QString&setNum(longn,intbase=10)QString&setNum(ulongn,intbase=10)QString&setNum(floatn,charf='g',intprec=6)QString&setNum(doublen,charf='g',intprec=6)voidsetExpand(uintindex,QCharc)(obsolete)QString&operator+=(constQString&str)QString&operator+=(QCharc)QString&operator+=(charc)QCharat(uinti)constQCharoperator[](inti)constQCharRefat(uinti)QCharRefoperator[](inti)QCharconstref(uinti)constQChar&ref(uinti)constQChar*unicode()constconstchar*ascii()const(obsolete)constchar*latin1()constQCStringutf8()constQCStringlocal8Bit()constbooloperator!()constoperatorconstchar*()constQString&setUnicode(constQChar*unicode,uintlen)QString&setUnicodeCodes(constushort*unicode_as_ushorts,uintlen)QString&setLatin1(constchar*str,intlen=-1)intcompare(constQString&s)constintlocaleAwareCompare(constQString&s)constvoidcompose()constchar*data()const(obsolete)boolstartsWith(constQString&s)constboolendsWith(constQString&s)constvoidsetLength(uintnewLen)静态公有成员QStringnumber(longn,intbase=10)QStringnumber(ulongn,intbase=10)QStringnumber(intn,intbase=10)QStringnumber(uintn,intbase=10)QStringnumber(doublen,charf='g',intprec=6)QStringfromLatin1(constchar*chars,intlen=-1)QStringfromUtf8(constchar*utf8,intlen=-1)QStringfromLocal8Bit(constchar*local8Bit,intlen=-1)intcompare(constQString&s1,constQString&s2)intlocaleAwareCompare(constQString&s1,constQString&s2)相关函数booloperator==