insert Function
Function: |
Inserts insert_str string into the dest_str string at the insert position pos. Returns the new length of dest_str. |
Syntax: |
insert(byref dest_str as string, pos as byte,byref insert_str as string) as byte |
See Also: |
--- |
Part |
Description |
dest_str |
The string to insert into. |
pos |
Insert position in the dest_str, counting from 1. |
insert_str |
The string to insert. |
Details
This is an insert with overwrite, meaning that insert_str will overwrite a portion of dest_str.
The dest_str length can increase as a result of this operation (but not beyond the declared string capacity). This will happen if the insertion position does not allow source_str to fit within the current length of dest_string.
Examples
s = "FLIGHT XXX STATUS"
insert(s,8,"123") 's will now be 'FLIGHT 123 STATUS'