var$ = InsertStr(s$, sub$, pos[, overwrite, encoding])
s$at the position specified by
pos(0 means beginning of the string). The position needs to be specified in characters, not in bytes. If the optional argument
overwriteis set to
sub$will overwrite any characters that were previously there on the insert position.
encoding parameter can be used to set the character encoding
to use. This defaults to the default string encoding set using SetDefaultEncoding().
See Character encodings for details.
sub$in characters (0 means beginning)
sub$should overwrite characters in
s$or shift them to the right (defaults to
Falsewhich means no overwriting)
Print(InsertStr("Hollywood is a very cool program!", " very", 19))The above code prints "Hollywood is a very very cool program!"
Print(InsertStr("Hollywood is a very cool program!", "good", 20, True))The above code prints "Hollywood is a very good program!"