Character Data

IText provides several functions for accessing specific characters or character ranges.

The framework provides a special class, ICharacterReference, that acts as a simple proxy class to access single UniChar values. IText uses ICharacterReference wherever a non-const reference to a UniChar is required. ICharacterReference provides a safer character reference mechanism by:

ICharacterReference provides an operator that returns a copy of the referenced UniChar values.

This figure shows the low-level IText functions for accessing characters:

Editing Character Data

IText provides functions for editing character data. You can specify the text to add to the object as:

Unless noted, text added to an IText retains its character styling information (Unicode characters inserted into an IText are considered unstyled). Paragraph styles are propagated as appropriate.

This figure shows the IText interfaces for editing character data:

Unlike IString::change, the IText::replace function is not able to perform a full search and replace.