INSERT$()

INSERT$(S1,S2,P)

RETURNS A STRING MADE WITH S2 INSERTED INTO S1 IN POSITION P

  • Type: Function
  • Parameters: 3
  • Group: Strings

ACTION

The function INSERT$(S1,S2,P) returns a string made with the string S2 inserted into the string S1 in position P.

P must be greater than or equal to 1.

SYNTAX: Result$=INSERT$(S1,S2,P)

  • S1 = string expression.
  • S2 = string expression.
  • P = real or integer expression.
  • Result$ is a string.

USE

  • The function INSERT$() is used to insert a string into another string.

ERROR

  • If S1 is not a correct string expression.
  • If S2 is not a correct string expression.

EXAMPLE

dim a$,b$

a$="hellofriends"

b$=" good "

print insert$(a$,b$,6)

print "hello good friends"

SEE ALSO

INSTR()

LEFT$()

LEN()

LOWER$()

LTRIM$()

MID$()

RIGHT$()

RTRIM$()

STR$()

STRING$()

TRIM$()

UPPER$()