Rhino C++ API  8.13
Public Member Functions | List of all members
ON_TextIterator Class Reference

Converts wchar_t characters to Unicode codepoints. More...

#include <opennurbs_textiterator.h>

Public Member Functions

 ON_TextIterator (const ON_TextIterator &)=default
 
 ON_TextIterator (const ON_wString &str)
 
 ON_TextIterator (const wchar_t *str, size_t length)
 
 ~ON_TextIterator ()=default
 
bool AtBackslashTic () const
 
bool Back ()
 move position back and return current codepoint after moving back More...
 
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)
 
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 ( )

move position back and return current codepoint after moving 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)

Description: 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 ( )

Get the next UNICODE code point encoded in m_text beginning at m_text[m_next_text_ci]; Save this code point in m_cur_codepoint. Advance m_next_text_ci.