The vgLib.copyBytes() system function copies the contents of one substring to another, byte by byte, without regard for the format of that content.
vgLib.copyBytes() 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 is longer than the target, the source is truncated. If the source is shorter than the target, the source value is padded with blanks, even if that value is numeric.
vgLib.copyBytes(
target HEX inOut,
targetSubstrIndex INT in,
targetSubstrLength INT in,
source HEX inOut,
sourceSubstrIndex INT in,
sourcetSubstrLength INT in)
The following example copies the source string into the middle of target:
target HEX (8) = "1200567"; // target = "12005670"
source HEX (4)= "3478"; // index must be multiple of 2
vgLib.copyBytes(target,2,1,source,1,1); // target = "12345670"