Delete Procedure
The Delete
procedure removes
Count
characters from a string, starting at
StartingIndex
. If Count
is more
than the number of characters remaining in the string,
Delete
deletes the rest of the string, starting
from StartingIndex
. Delete
is
not a real
procedure.
The first character of a string has index 1.
If StartingIndex
is not positive or is greater
than the length of the string, Delete
does not
change the string.
If the Count
is greater than the characters
remaining after the starting index, the rest of the string is
deleted.
If you want to delete characters at the end of a string,
SetLength
is slightly faster than calling the more
general purpose Delete
.