home *** CD-ROM | disk | FTP | other *** search
/ Merciful 5 / Merciful - Disc 5.iso / software / p / pcqpascalv1.2d.lha / Examples2 / StingLibPCQ / source / Delete.p < prev    next >
Encoding:
Text File  |  1997-05-06  |  330 b   |  21 lines

  1. external;
  2.  
  3. {$I "include:utils/stringlib.i"}
  4.  
  5. function Str_Delete(s : string;dep,long : integer) : string;
  6.  
  7. var
  8.     s1 : string;
  9.     c    : integer;
  10.  
  11. begin
  12.     s1 := allocstring(strlen(s)+1-long);
  13.     dep := dep-1;
  14.     for c := 0 to (dep-1) do
  15.         s1[c] := s[c];
  16.     for c := (dep+long) to (strlen(s)-1) do
  17.         s1[c-long] := s[c];
  18.     Str_Delete := s1;
  19. end;
  20.  
  21.