NDEVR
API Documentation
UTF8Iterator

Iterates over a UTF8 encoded string and returns the values as UTF16. More...

Collaboration diagram for UTF8Iterator:
[legend]

Public Member Functions

 UTF8Iterator (const StringView &string)
 Constructs a UTF8Iterator from a StringView.
uint04 location (const StringView &original_string) const
 Returns the current byte offset within the original string.
wchar nextChar ()
 Reads and returns the next UTF16 character, advancing the iterator.

Protected Attributes

StringView string
 The remaining portion of the string being iterated.

Detailed Description

Iterates over a UTF8 encoded string and returns the values as UTF16.


Definition at line 826 of file StringView.h.

Constructor & Destructor Documentation

◆ UTF8Iterator()

UTF8Iterator::UTF8Iterator ( const StringView & string)

Constructs a UTF8Iterator from a StringView.

Parameters
[in]stringThe UTF8-encoded StringView to iterate over.

Member Function Documentation

◆ location()

uint04 UTF8Iterator::location ( const StringView & original_string) const

Returns the current byte offset within the original string.

Parameters
[in]original_stringThe original StringView to compute the offset from.
Returns
The byte offset of the current iterator position.

◆ nextChar()

wchar UTF8Iterator::nextChar ( )

Reads and returns the next UTF16 character, advancing the iterator.

Returns
The next character as a wchar (UTF16).

The documentation for this class was generated from the following file: