paste()

Pastes a string into another string while possibly replacing part of the string being pasted into.

This function is valid in v2.0.0 to v2.14.0. This function has been downloaded 47 times.

Parameters

{string} str
String to be modified.
{string} newPart
String to be pasted into str.
{number} startIndex
Index within str indicating where to paste newPart.
{number=} opt_endIndex Optional, Default:startIndex
Index within str indicating where the end of newPart will end.

Returns

{string}
A copy of str modified so that newPart is pasted into it from startIndex to opt_endIndex.

Required Function

This function requires the following function which is included automatically:

  • cut()
    Cut out a substring within a given range.