QTextEncoder Class
QTextEncoder クラスは、ステートベースのエンコーダを提供します。詳細...
ヘッダー | #include <QTextEncoder> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core5Compat) target_link_libraries(mytarget PRIVATE Qt6::Core5Compat) |
qmake: | QT += core5compat |
注意:このクラスの関数はすべてリエントラントです。
パブリック関数
QTextEncoder(const QTextCodec *codec) | |
QTextEncoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags) | |
~QTextEncoder() | |
QByteArray | fromUnicode(const QString &str) |
QByteArray | fromUnicode(QStringView str) |
QByteArray | fromUnicode(const QChar *uc, int len) |
詳細説明
テキストエンコーダは、特定のコーデックを使用して Unicode からエンコードされたテキスト形式にテキストを変換します。
エンコーダは Unicode を別の形式に変換し、呼び出しの間に必要な状態を記憶します。
QTextCodec::makeEncoder() およびQTextDecoderも参照 。
メンバ関数ドキュメント
[explicit]
QTextEncoder::QTextEncoder(const QTextCodec *codec)
与えられたcodec に対するテキストエンコーダを構築します。
[explicit]
QTextEncoder::QTextEncoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags)
与えられたcodec と変換flags 、テキストエンコーダを構築します。
[noexcept]
QTextEncoder::~QTextEncoder()
エンコーダを破壊する。
QByteArray QTextEncoder::fromUnicode(const QString &str)
Unicode 文字列str をエンコードされたQByteArray に変換します。
QByteArray QTextEncoder::fromUnicode(QStringView str)
これはオーバーロードされた関数である。
Unicode 文字列str をエンコードされたQByteArray に変換します。
QByteArray QTextEncoder::fromUnicode(const QChar *uc, int len)
これはオーバーロードされた関数である。
uc からlen 文字(バイトではない)を変換し、結果をQByteArray で返します。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.