Skip to content

Latest commit

 

History

History
85 lines (51 loc) · 1.46 KB

UTF8Decoder.md

File metadata and controls

85 lines (51 loc) · 1.46 KB

UTF8Decoder

class UTF8Decoder

Required header: <Eclog/UTF8Decoder.h>

The UTF8Decoder class represents a UTF-8 decoder.

Member functions

Name Description
(constructor) Constructor.
peekChar Reads the next Unicode character from the input stream without extracting it.
getChar Extracts the next Unicode character from the input stream.
position Returns the position of the current character.

(constructor)

explicit UTF8Decoder(InputStream& is);

Constructs a UTF8Decoder.

Parameters

InputStream& os The UTF-8 encoded stream to read from.


peekChar

int peekChar();
int peekChar(ErrorCode& ec);

Reads the next Unicode character from the input stream without extracting it.

Parameters

ErrorCode& ec Set to indicate what error occurred, if any.

Return value

int Unicode code point.


getChar

int getChar();
int getChar(ErrorCode& ec);

Extracts the next Unicode character from the input stream.

Parameters

ErrorCode& ec Set to indicate what error occurred, if any.

Return value

int Unicode code point.


position

long long position() const;

Returns the position of the current character.

Return value

long long The current position.