Logo Search packages:      
Sourcecode: icu version File versions  Download package

typedef void U_CALLCONV UTextCopy(UText *ut, int64_t nativeStart, int64_t nativeLimit, int64_t nativeDest, UBool move, UErrorCode *status)

Function type declaration for UText.copy().

Copy or move a substring from one position to another within the text, while retaining any metadata associated with the text. This function is used to duplicate or reorder substrings. The destination index must not overlap the source range.

The text to be copied or moved is inserted at destIndex; it does not replace or overwrite any existing text.

This function need only be implemented for UText types that support writing.

When using this function, there should be only a single UText opened onto the underlying native text string. The function is responsible for updating the text chunk within the UText to reflect the updated iteration position, taking into account any changes to the underlying string's structure caused by the replace operation.

Parameters:
ut The UText representing the text to be operated on.
nativeStart The index of the start of the region to be copied or moved
nativeLimit The index of the character following the region to be replaced.
nativeDest The destination index to which the source substring is copied or moved.
move If TRUE, then the substring is moved, not copied/duplicated.
status receives any error status. Possible errors include U_NO_WRITE_PERMISSION
ICU 3.4

Definition at line 1277 of file utext.h.


Generated by  Doxygen 1.6.0   Back to index