RAD function: strins

A RAD function that inserts a substring into another string.

Function

strins

Format

$L.void=strins($target, $tindex, $source, $sindex, $number)

Parameters

The following parameters are valid for the strins function:

Parameter Data type Description
$L.void= Not applicable. A syntax requirement only, does not affect the outcome of the function.
$target String The string being modified.
$tindex Number The position in $target to begin inserting a substring from $source.
$source String The string supplying a substring.
$sindex String The beginning position of the substring within $source.
$number Number The number of characters to insert from $source.
Example
$target="Hewlett-Packard"
$tindex=4
$source="falcon"
$sindex=2
$number=3
$L.void=strins($target, $tindex, $source, $sindex, $number)

After execution, value of $target is Hewalclett-Packard.