CoreComponents 3.0.0
A Modern C++ Toolkit
Loading...
Searching...
No Matches
Utf8Source Class Reference

UTF-8 decoding data source. More...

#include <cc/Utf8Source>

Public Member Functions

 Utf8Source (const Stream &stream)
 Create a new UTF-8 decoding data source.
 
 Utf8Source (const Stream &stream, const Bytes &buffer)
 Create a new UTF-8 decoding data source.
 
 Utf8Source (const Bytes &buffer)
 Create a new UTF-8 decoding data source.
 
bool read (Out< char32_t > ch)
 Read the next Unicode character.
 

Detailed Description

UTF-8 decoding data source.

Exceptions
UnicodeError

Constructor & Destructor Documentation

◆ Utf8Source() [1/3]

Utf8Source ( const Stream & stream)

Create a new UTF-8 decoding data source.

Parameters
streamUnderlying data stream

◆ Utf8Source() [2/3]

Utf8Source ( const Stream & stream,
const Bytes & buffer )

Create a new UTF-8 decoding data source.

Parameters
streamUnderlying data stream
bufferInput buffer

◆ Utf8Source() [3/3]

Utf8Source ( const Bytes & buffer)

Create a new UTF-8 decoding data source.

Parameters
bufferInput buffer

Member Function Documentation

◆ read()

bool read ( Out< char32_t > ch)

Read the next Unicode character.

Parameters
chReturns the Unicode character read if any
Returns
True if not end of information, false otherwise