ON_TextIterator Class Reference

Converts wchar_t characters to Unicode codepoints. More...

#include <opennurbs_textiterator.h>

Public Member Functions

 ON_TextIterator (const ON_wString &str)
 
 ON_TextIterator (const wchar_t *str, size_t length)
 
 ON_TextIterator (const ON_TextIterator &)=default
 
 ~ON_TextIterator ()=default
 
bool AtBackslashTic () const
 
bool Back ()
 
ON_TextIteratoroperator= (const ON_TextIterator &)=default
 
bool PeekCodePoint (ON__UINT32 &unicode_code_point) const
 
bool ReadCharValue (unsigned char &c)
 
bool ReadCodePoint (ON__UINT32 &unicode_code_point)
 Gets the current unicode code point and calls Step() to advance the text iterator by one code point. More...
 
bool Step ()
 

Detailed Description

Converts wchar_t characters to Unicode codepoints.

Constructor & Destructor Documentation

◆ ON_TextIterator() [1/3]

ON_TextIterator::ON_TextIterator ( const ON_wString str)

◆ ON_TextIterator() [2/3]

ON_TextIterator::ON_TextIterator ( const wchar_t *  str,
size_t  length 
)

◆ ~ON_TextIterator()

ON_TextIterator::~ON_TextIterator ( )
default

◆ ON_TextIterator() [3/3]

ON_TextIterator::ON_TextIterator ( const ON_TextIterator )
default

Member Function Documentation

◆ AtBackslashTic()

bool ON_TextIterator::AtBackslashTic ( ) const

◆ Back()

bool ON_TextIterator::Back ( )

◆ operator=()

ON_TextIterator& ON_TextIterator::operator= ( const ON_TextIterator )
default

◆ PeekCodePoint()

bool ON_TextIterator::PeekCodePoint ( ON__UINT32 &  unicode_code_point) const
Parameters
unicode_code_point[out] current unicode code point returned here. 0 = end of string
Returns
true if returned unicode_code_point is not zero

◆ ReadCharValue()

bool ON_TextIterator::ReadCharValue ( unsigned char &  c)

◆ ReadCodePoint()

bool ON_TextIterator::ReadCodePoint ( ON__UINT32 &  unicode_code_point)

Gets the current unicode code point and calls Step() to advance the text iterator by one code point.

Parameters
unicode_code_point[out] current unicode code point returned here. 0 = end of string
Returns
true if returned unicode_code_point is not zero

◆ Step()

bool ON_TextIterator::Step ( )