Field-Map Scripting

4.1.2.3 Delete

Delete procedure


Prototype:

procedure Delete: (var Data: string, const Index: integer, Count: integer);

Description:

Deletes up to Count characters (Count) from string variable starting from specified position (Index)

Deletes up to Count characters from the passed parameter Data string starting from position Index.


Syntax:

Delete(Data, Index, Count);


Part

Description


Data

A variable declared as a string.


Index

The position of the first character in the string to be deleted. The first character of a string is at position 1.


Count

Number of characters to be deleted

Return value:

none



Return value:

var
  s:string;
begin
  s:=('abies alba');
  Delete(s, 7, 4);
  ShowMessage(s); // s = 'abies'
end;  
  


See also:

Format; LZero; Delete; Trim; TrimLeft; TrimRight; SameText; StringReplace; DeFormat1-10; GetFieldCountFromString;GetFieldFromString; IndexOfField; SortNumericSequence