Function tip_RawDataInsertString


Prototype: tip_RawDataInsertString(Document);
Arguments:

Document: A Document object. (CDM_Document)
pos: The character offset (starting from 0) where the string will be inserted. The string will be inserted at the character pointed by this value, displacing any existing text at this position after the inserted text. (long)
string: The string to be inserted. (char *)

C++ API Sections
Tcl API Sections
Description
Return Value
Notes
See Also
Index

Description:

This function will modify the text contained in the specified Document, by inserting a string at the positions specified by the "pos" parameter. This position "pos" is the number of characters that have to be skipped before the string is inserted, where the first character of the Document text has a position equal to 0. If position is lower than zero, it is treaded as the last character of the Document text.

For example, if I have the string "This is a test", the following code:

tip_RawDataInsertString $Doc 10 "simple "

will modify the text of the Document to "This is a simple test".

The most important aspect of this function is that it will make the proper arrangements so as the Annotations contained inside the Document to be displaced by a proper amound of characters so as Annotations spanning text ranges after the insertion point to span the same text portions, after the string has been inserted.

This function will return the new Document text if the insertion was succesful.

Return Value:

This function will return the new Document text if the insertion was succesful.

Notes:

This function is equivelant to CDM_RawDataInsertString (C++ API).

See Also:

tip_ByteSequenceInsertString, tip_DisplaceAnnotations, tip_GetRawData, tip_SetRawData, CDM_RawDataInsertString


Generated by: petasis@aias on Wed Aug 16 10:31:45 PM EEST 2006.