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

UTF-8 encoding data sink. More...

#include <cc/Utf8Sink>

Public Member Functions

 Utf8Sink (const Stream &stream)
 Create a new UTF-8 encoding data sink.
 
 Utf8Sink (const Stream &stream, const Bytes &buffer)
 Create a new UTF-8 encoding data sink.
 
 Utf8Sink (const Bytes &buffer)
 Create a new UTF-8 encoding data sink.
 
void write (char32_t ch)
 Write Unicode character ch.
 
long long currentOffset () const
 Get the total number of bytes written.
 

Detailed Description

UTF-8 encoding data sink.

Exceptions
UnicodeError

Constructor & Destructor Documentation

◆ Utf8Sink() [1/3]

Utf8Sink ( const Stream & stream)

Create a new UTF-8 encoding data sink.

Parameters
streamUnderlying data stream

◆ Utf8Sink() [2/3]

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

Create a new UTF-8 encoding data sink.

Parameters
streamUnderlying data stream
bufferOutput buffer

◆ Utf8Sink() [3/3]

Utf8Sink ( const Bytes & buffer)

Create a new UTF-8 encoding data sink.

Parameters
bufferOutput buffer

Member Function Documentation

◆ write()

void write ( char32_t ch)

Write Unicode character ch.

◆ currentOffset()

long long currentOffset ( ) const

Get the total number of bytes written.