Procedure Insert will insert the specified string into a destination string.
PROCEDURE Insert(
source : DYNARRAY[] of CHAR;
VAR dest : DYNARRAY[] of CHAR;
index : INTEGER);def vs.Insert(source, index):
return dest| Name | Type | Description |
|---|---|---|
| source | DYNARRAY[] of CHAR | String to be inserted. |
| dest | DYNARRAY[] of CHAR | Destination string. |
| index | INTEGER | Position where string is to be inserted. |
theStr:='sample';
originalStr:='A string';
Insert(theStr,originalStr,3);
{inserts 'sample' into the target string}BEGIN
Delete (newString, i, 1);
Insert (CR, newString, i);
j := k1 - i;
END
strtemp:=Num2Str(decPlace,labtemp);
nOfChars2:=Len(strtemp);
IF NOT(nOfChars2>=nOfChars) THEN BEGIN {pad leading zeros}
WHILE (not(nOfChars2>=nOfChars)) DO BEGIN
Insert(kZero,strtemp,1);
nOfChars2:=Len(strtemp);
END;
BEGIN
Delete (gNutSize, i, 1);
Insert (',', gNutSize, i);
END;result = vs.Insert(source, 1)Availability: from All Versions