RAD function: strcpy

A RAD function that replaces a part of a string with a substring.

Function

strcpy

Format

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

Parameters

The following parameters are valid for the strcpy 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 copying 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 copy from $source.

Example

$target="Hewlett-Packard"
$tindex=4
$source="falcon"
$sindex=2
$number=3
$L.void=strcpy($target, $tindex, $source, $sindex, $number)

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