From Clomosy Docs

Removes a substring from a string or elements range from a dynamic array.

S is a string-type or dynamic array-type variable. Index and Count are integer-type expressions.

Delete has a slightly different behavior depending on S type.

String-typeDelete removes a substring of Count characters from a string, starting at S[Index].

If Index is larger than the length of the string or less than 1, no characters are deleted.

If Count specifies more characters than the remaining in the string (counting from Index), Delete removes the rest of the string. If the value of Count is equal to or less than 0, then no characters are deleted.

Example

var
 strValue : string;

{
 strValue = '12345678';
 Delete(strValue, 3, 4);    // Delete the 3rd, 4th, 5th and 6th characters
 ShowMessage('strValue now : '+strValue);
}

Output:

See Also