STRINSERT$ function

Purpose

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

Syntax

s$ = STRINSERT$(Main$, sNew$, position&)

Remarks

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

See also

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

Example

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

Result

PowerfulBASIC