strIns Function

Builds a string by inserting one string into another.


str strIns(str _text1, str _text2, int _position)

Parameter

Description

_text1

The string into which to insert.

_text2

The string to insert into the other string.

_position

The position where the first character of the _text2 parameter should occur in the output string.

The combined text string.

The strIns function is complementary to the strDel function. If the value of the _position parameter is greater than the length of the original string, the string to be inserted is appended to the end of the original string.

  • strIns("ABFGH","CDE",3); //Returns the string "ABCDEFGH".

  • strIns("ABCD","EFGH",10); //Returns the string "ABCDEFGH".

Community Additions

ADD
Show: