From Clomosy Docs
procedure Delete(var S: String; Index: Integer; Count: Integer);
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.
Notes: On strings, Delete uses one-based indexing even when zero-based strings are enabled.
Example
var
strValue : string;
{
strValue = '12345678';
Delete(strValue, 3, 4); // Delete the 3rd, 4th, 5th and 6th characters
ShowMessage('strValue now : '+strValue);
}
Output:
strValue now : 1278