Qtリファレンス QStringのソースを表示
新しいページはコチラ
移動:
案内
,
検索
[[Qt#Qtリファレンス|Qtリファレンス]]へ戻る == '''QString 概要''' == Qt5.15.2 #include <QString>をインクルードする必要があります。文字列を格納するのに適したクラスです。格納した文字列に対する操作にも強力なメカニズムを提供してくれます。 === '''公開 メンバ変数''' === *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">flags</span> <span style="color:blue;">SectionFlags</span>;</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">enum</span> <span style="color:blue;">NormalizationForm</span>;</span> :*0:NormalizationForm_D :*1:NormalizationForm_C :*2:NormalizationForm_DK :*3:NormalizationForm_KC *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">enum</span> <span style="color:blue;">SectionFlag</span>;</span> :*0:SectionDefault :*1:SectionSkipEmpty :*2:SectionIncludeLandingSep :*3:SectionIncludeTrailingSep :*4:SectionCaseInsentiveSeps *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">ConstIterator</span>;</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">Iterator</span>;</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">iterator</span>;</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">const_iterator</span>;</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">reverse_iterator</span>;</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">const_reverse_iterator</span>;</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">pointer</span>;</span>→QChar *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">const_pointer</span>;</span>→QChar *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">reference</span>;</span>→QChar& *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">const_reference</span>;</span>→QChar& *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">difference_type</span>;</span>→qptrdiff *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">size_type</span>;</span>→int *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">typedef</span> <span style="color:blue;">value_type</span>;</span>→QChar typedef型のメンバ変数はそのメンバ変数の型名を使うということを定義しています。QString型の中でIterator型の戻り値などに使われます。この結びつけはSTL-style iteratorで定義されていることになっています。例えば <syntaxhighlight2 lang="cpp"> QString obj; QString::const_iterator const QStringConstIterator_obj; QStringConstIterator_obj = obj.Begin(); </syntaxhighlight2> のような感じです。 === '''コンストラクタ QString::QString''' === *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:blue;">QString::QString</span>();</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:blue;">QString::QString</span>(<span style="color:deeppink;">const char*</span> str);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:blue;">QString::QString</span>(<span style="color:deeppink;">int</span> size, <span style="color:deeppink;">QChar</span> ch);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:blue;">QString::QString</span>(<span style="color:deeppink;">QChar</span> ch);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:blue;">QString::QString</span>(<span style="color:deeppink;">const QChar*</span> unicode, <span style="color:deeppink;">int</span> size= -1);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:blue;">QString::QString</span>(<span style="color:deeppink;">const QString&</span> other);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:blue;">QString::QString</span>(<span style="color:deeppink;">QString&&</span> other);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:blue;">QString::QString</span>(<span style="color:deeppink;">QLatine1String</span> str);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:blue;">QString::QString</span>(<span style="color:deeppink;">const QByteArray&</span> ba);</span> === '''デストラクタ QString::~QString''' === *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:blue;">QString::~QString</span>();</span> === '''演算子 = ''' === *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">QString&</span> <span style="color:blue;">QString::operator=</span>(<span style="color:deeppink;">const QString&</span> other);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">QString&</span> <span style="color:blue;">QString::operator=</span>(<span style="color:deeppink;">QString&&</span> other);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">QString&</span> <span style="color:blue;">QString::operator=</span>(<span style="color:deeppink;">const QByteArray&</span> ba);</span> === '''公開 メンバ関数 append''' === *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">QString&</span> <span style="color:blue;">QString::append</span>(<span style="color:deeppink;">char</span> ch);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">QString&</span> <span style="color:blue;">QString::append</span>(<span style="color:deeppink;">int</span> count, <span style="color:deeppink;">char</span> ch);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">QString&</span> <span style="color:blue;">QString::append</span>(<span style="color:deeppink;">const char*</span> str);</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">QString&</span> <span style="color:blue;">QString::append</span>(<span style="color:deeppink;">const char*</span> str, <span style="color:deeppink;">int</span> len);</span> === '''公開 メンバ関数 at''' === *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">char</span> <span style="color:blue;">QString::at</span>(<span style="color:deeppink;">int</span> i) <span style="color:deeppink;">const</span>;</span> === '''公開 メンバ関数 back''' === *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">QString&</span> <span style="color:blue;">QString::back</span>() <span style="color:deeppink;">const</span>;</span> *<span style = "background:linear-gradient(transparent 75%, #ffbf7f 75%); font-weight:bold; "><span style="color:deeppink;">QByteRef</span> <span style="color:blue;">QString::back</span>();</span> [[Qt#Qtリファレンス|Qtリファレンス]]へ戻る
Qtリファレンス QString
に戻る。
個人用ツール
ログイン
名前空間
ページ
議論
変種
表示
閲覧
ソースを表示
履歴表示
操作
検索
案内
メインページ
コミュニティ・ポータル
最近の出来事
最近の更新
おまかせ表示
ヘルプ
ツールボックス
リンク元
関連ページの更新状況
特別ページ