procedure Delete(var S: <string or dynamic array>; Index: Integer; Count: Integer);
Removes a substring from a string, or removes elements from a dynamic array and returns the modified array.
In Object Pascal code, Delete removes a substring of
Count characters from string or array
S, starting with
S is a string-type variable.
Count are integer-type expressions.
Index is larger than the length of the string or array (or less than 1), no characters are deleted.
Count specifies more characters or array fields than remain starting at
Index, Delete removes the rest of the string or array. If
Count is less than or equal to 0, no characters are deleted.
Dynamic Array Example
var A: array of integer; begin ... A:=[1,2,3,4]; Delete(A,1,2); //A will become [1,4] ... end;