STRINSERT$ function

Purpose

Insert a string at a specified position within another string expression.

Syntax

s$ = STRINSERT$(MainStr$, NewStr$, position&)

Remarks

Returns a string consisting of the string expression MainStr$, with the string expression NewStr$ inserted at position&.  If position& is greater than the length of MainStr$, NewStr$ is appended to MainStr$.  The first character in the string is position 1, etc.

See also

BUILD$, CLIP$, CSET, CSET$, LSETRSETSTRDELETE$, STRREVERSE$, WRAP$

Example

a$ = STRINSERT$("PowerBASIC", "ful", 6)

Result

PowerfulBASIC