Delete

Declaration:
Procedure Delete (var S : string;Index : Integer;Count : Integer);
Description:
Delete removes Count characters from string S, starting at position Index. All characters after the delected characters are shifted Count positions to the left, and the length of the string is adjusted.
Errors:
None.
See also:
Copy (477),Pos (546),Insert (521)

Listing: refex/ex15.pp


Program Example15;

{ Program to demonstrate the Delete function. }

Var
  S : String;

begin
  S:='This is not easy !';
  Delete (S,9,4); { S:='This is easy !' }
end.