Functions | |
void | Edit_Text (HC_KEY key, int row, int column, int erase, int delete, const char *new_text) |
void Edit_Text | ( | HC_KEY | key, | |
int | row, | |||
int | column, | |||
int | erase, | |||
int | delete, | |||
const char * | new_text | |||
) |
Manipulate the characters in a previously defined string.
key | - The identifier returned by a previous KInsert_Text() or KInsert_Text_With_Encoding() . | |
row | - The row of text that the Edit operates within. This should be always specified as zero. | |
column | - The character position within the row where the Edit should start. The leftmost character in any row is at position zero. | |
erase | - The number of characters to change to blanks. | |
delete | - The number of characters to remove from this row. If spec ified as "-1", the number deleted will be equal to length of new_text inserted. | |
new_text | - Characters to be inserted (if any). |
The three possible operations---erase, delete, and insert new_text---are performed consecutively in that order. Note, specifying a -1 for delete gives the effect of a "replace" operation, without having to count the characters yourself.
If key resulted from a call to KInsert_Text_With_Encoding() , then the "encoding" of new_text is assumed to be the same as that of the original text. If in doubt, use Show_Text_Encoding() first.
If the number of characters inserted does not equal the number deleted, the overall length of the stored text will be changed. Text alignment will be recomputed as needed.