The vgLib.copyStr() system function copies characters from one substring to another. Despite the name, you cannot use strings with this function.
vgLib.copyStr() is one of a number of functions maintained for compatibility with earlier versions. New code should use standard EGL operators for these purposes.
If the source substring is longer than the target substring, the source substring is truncated. If the source substring is shorter than the target substring, the source substring is padded on the right with spaces.
vgLib.copyStr(
target CHAR | DBCHAR | MBCHAR | UNICODE | NUM inOut,
targetSubstringIndex INT in,
targetSubstringLength INT in,
source CHAR | DBCHAR | MBCHAR | UNICODE | NUM in,
sourceSubstringIndex INT in,
sourcetSubstringLength INT in)
The following example copies the source characters into the middle of the target characters:
target, source CHAR (6); // index must be multiple of 2
target = "120056";
source = "34";
vgLib.copyStr(target,3,2,source,1,2); // target = "123456"