Insert procedure inserts a substring into a string.
Insert(S, Str, Index)
Inserts the S substring into the Str string starting from the Index position.
The procedure has the following parameters:
Specifies the string to be inserted. If S is empty, the current procedure does nothing.
Specifies the string to which the S substring is inserted.
Specifies the position of the insertion point, from 1 (if Index is less than 1, it is set to 1). If Index is 1, the S substring will be inserted at the beginning of the Str string. If Index is greater than the length of the Str string, the substring is appended to the end of the string.