You are here: Scripting Reference > Functions > String > Delete

Delete

Declaration

procedure Delete(var s: string; ifrom, icount: Longint);

Example

procedure OnMapEvent(var Value:Variant);

var

mystring : string;

begin

mystring := 'abcdef';

Delete(mystring,2,3); // mystring becomes 'aef'

end;

Description

Deletes the number of characters specified by icount, starting at the position given by iFrom. The first character in a string is position 1. To delete just one character set iCount to 1.