Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QTextEncoder Class

TheQTextEncoder class provides a state-based encoder.More...

Header:#include <QTextEncoder>

Note: All functions in this class arereentrant.

Public Functions

QTextEncoder(const QTextCodec * codec)
QTextEncoder(const QTextCodec * codec, QTextCodec::ConversionFlags flags)
~QTextEncoder()
QByteArrayfromUnicode(const QString & str)
QByteArrayfromUnicode(const QChar * uc, int len)

Detailed Description

TheQTextEncoder class provides a state-based encoder.

A text encoder converts text from Unicode into an encoded text format using a specific codec.

The encoder converts Unicode into another format, remembering any state that is required between calls.

See alsoQTextCodec::makeEncoder() andQTextDecoder.

Member Function Documentation

QTextEncoder::QTextEncoder(constQTextCodec * codec)

Constructs a text encoder for the givencodec.

QTextEncoder::QTextEncoder(constQTextCodec * codec,QTextCodec::ConversionFlags flags)

Constructs a text encoder for the givencodec and conversionflags.

This function was introduced in Qt 4.7.

QTextEncoder::~QTextEncoder()

Destroys the encoder.

QByteArray QTextEncoder::fromUnicode(constQString & str)

Converts the Unicode stringstr into an encodedQByteArray.

QByteArray QTextEncoder::fromUnicode(constQChar * uc,int len)

This is an overloaded function.

Convertslen characters (not bytes) fromuc, and returns the result in aQByteArray.

© 2016 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 theGNU 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.


[8]ページ先頭

©2009-2025 Movatter.jp