QString类参考

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

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()constboolisEmpty()constuintlength()constvoidtruncate(uintnewLen)QString&fill(QCharc,intlen=-1)QStringcopy()const(obsolete)QStringarg(longa,intfieldwidth=0,intbase=10)constQStringarg(ulonga,intfieldwidth=0,intbase=10)constQStringarg(inta,intfieldwidth=0,intbase=10)constQStringarg(uinta,intfieldwidth=0,intbase=10)constQStringarg(shorta,intfieldwidth=0,intbase=10)constQStringarg(ushorta,intfieldwidth=0,intbase=10)constQStringarg(chara,intfieldwidth=0)constQStringarg(QChara,intfieldwidth=0)constQStringarg(constQString&a,intfieldwidth=0)constQStringarg(doublea,intfieldwidth=0,charfmt='g',intprec=-1)constQString&sprintf(constchar*cformat,...)intfind(QCharc,intindex=0,boolcs=TRUE)constintfind(charc,intindex=0,boolcs=TRUE)constintfind(constQString&str,intindex=0,boolcs=TRUE)constintfind(constQRegExp&rx,intindex=0)constintfind(constchar*str,intindex=0)constintfindRev(QCharc,intindex=-1,boolcs=TRUE)constintfindRev(charc,intindex=-1,boolcs=TRUE)constintfindRev(constQString&str,intindex=-1,boolcs=TRUE)constintfindRev(constQRegExp&rx,intindex=-1)constintfindRev(constchar*str,intindex=-1)constintcontains(QCharc,boolcs=TRUE)constintcontains(charc,boolcs=TRUE)constintcontains(constchar*str,boolcs=TRUE)constintcontains(constQString&str,boolcs=TRUE)constintcontains(constQRegExp&rx)constenumSectionFlags{SectionDefault=0x00,SectionSkipEmpty=0x01,SectionIncludeLeadingSep=0x02,SectionIncludeTrailingSep=0x04,SectionCaseInsensitiveSeps=0x08}QStringsection(QCharsep,intstart,intend=0xffffffff,intflags=SectionDefault)constQStringsection(charsep,intstart,intend=0xffffffff,intflags=SectionDefault)constQStringsection(constchar*sep,intstart,intend=0xffffffff,intflags=SectionDefault)constQStringsection(constQString&sep,intstart,intend=0xffffffff,intflags=SectionDefault)constQStringsection(constQRegExp®,intstart,intend=0xffffffff,intflags=SectionDefault)constQStringleft(uintlen)constQStringright(uintlen)constQStringmid(uintindex,uintlen=0xffffffff)constQStringleftJustify(uintwidth,QCharfill='',booltruncate=FALSE)constQStringrightJustify(uintwidth,QCharfill='',booltruncate=FALSE)constQStringlower()constQStringupper()constQStringstripWhiteSpace()constQStringsimplifyWhiteSpace()constQString&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)constushorttoUShort(bool*ok=0,intbase=10)constinttoInt(bool*ok=0,intbase=10)constuinttoUInt(bool*ok=0,intbase=10)constlongtoLong(bool*ok=0,intbase=10)constulongtoULong(bool*ok=0,intbase=10)constfloattoFloat(bool*ok=0)constdoubletoDouble(bool*ok=0)constQString&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)constQCharoperator[](inti)constQCharRefat(uinti)QCharRefoperator[](inti)QCharconstref(uinti)constQChar&ref(uinti)constQChar*unicode()constconstchar*ascii()const(obsolete)constchar*latin1()constQCStringutf8()constQCStringlocal8Bit()constbooloperator!()constoperatorconstchar*()constQString&setUnicode(constQChar*unicode,uintlen)QString&setUnicodeCodes(constushort*unicode_as_ushorts,uintlen)QString&setLatin1(constchar*str,intlen=-1)intcompare(constQString&s)constintlocaleAwareCompare(constQString&s)constvoidcompose()constchar*data()const(obsolete)boolstartsWith(constQString&s)constboolendsWith(constQString&s)constvoidsetLength(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==(constQString&s1,constQString&s2)boolope

1 / 60
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功