![]() |
TXNDataSize |
||||
Header: | MacTextEditor.h | Carbon status: | Supported | |
Returns the amount of memory used to hold the text in a given text object.
ByteCount TXNDataSize ( TXNObject iTXNObject );
A variable of type TXNObject. Pass the text object that you want to examine.
A variable of type ByteCount that specifies the number of bytes required to hold the characters.
You can use this function to determine how large a handle should be if, for example, you copy text. Note that since every individual sound, picture, or movie in a text object is represented by a single character in the text buffer, the TXNDataSize function returns a value that does not necessarily represent the true size of any non-text data.
If you are using Unicode and you want to know the number of characters, divide the returned ByteCount value by sizeof(UniChar) or 2, since MLTE uses UTF-16.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)