help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'System' (#rtl)

Delete

Delete part of a string.

Declaration

Source position: line 0

procedure Delete(

  var s: shortstring;

  index: SizeInt;

  count: SizeInt

);

procedure Delete(

  var S: AnsiString;

  Index: SizeInt;

  Size: SizeInt

);

procedure Delete(

  var S: WideString;

  Index: SizeInt;

  Size: SizeInt

);

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

  

Copy part of a string.

Pos

  

Search for substring in a string.

Insert

  

Insert one string in another.

Example

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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505