Referencing positions and ranges in a character string

Before you create text objects and manipulate their contents, you need to understand the classes you use to access specific positions and ranges within a text object. The classes in this diagram are used to identify positions and ranges within text.


TTextRegion and TTextRange provide the protocol for referencing a range of text in an address-independent manner. A TTextRegion instance consists of one or more TTextRange instances. You can iterate through the TTextRange instances contained by a TTextRegion using a TTextRegionIterator. Each TTextRange stores the beginning text offset and the length of the range. Use TTextRange or TTextRegion to specify part or all of the text within a text object.

The classes for representing these character ranges are based on three primitive types:



[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker