home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / pascal2c / string.pas < prev    next >
Pascal/Delphi Source File  |  1992-08-03  |  2KB  |  51 lines

  1.  
  2. { Oregon Software Pascal dynamic string package. }
  3.  
  4.  
  5. {*VarFiles=0}  {INTF-ONLY}
  6.  
  7. function Len(var s : array [lo..hi:integer] of char) : integer; external;
  8. {FuncMacro Len(lo,hi,s) = strlen(s)}
  9.  
  10. procedure Clear(var s : array [lo..hi:integer] of char); external;
  11. {FuncMacro Clear(lo,hi,s) = (s[lo] = 0)}
  12.  
  13. procedure ReadString(var f : text;
  14.              var s : array [lo..hi:integer] of char); external;
  15. {FuncMacro ReadString(f,lo,hi,s) = fgets(s, hi-lo+1, f)}
  16.  
  17. procedure WriteString(var f : text;
  18.               var s : array [lo..hi:integer] of char); external;
  19. {FuncMacro WriteString(f,lo,hi,s) = fprintf(f, "%s", s)}
  20.  
  21. procedure Concatenate(var d : array [lod..hid:integer] of char;
  22.               var s : array [los..his:integer] of char); external;
  23. {FuncMacro Concatenate(lod,hid,d,los,his,s) = strcat(d, s)}
  24.  
  25. function Search(var s : array [lo..hi:integer] of char;
  26.         var s2 : array [lo2..hi2:integer] of char;
  27.         i : integer) : integer; external;
  28. {FuncMacro Search(lo,hi,s,lo2,hi2,s2,i) = strpos2(s,s2,i-lo)+lo}
  29.  
  30. procedure Insert(var d : array [lod..hid:integer] of char;
  31.          var s : array [los..his:integer] of char;
  32.          i : integer); external;
  33. {FuncMacro Insert(lod,hid,d,los,his,s,i) = strinsert(s,d,i-lod)}
  34.  
  35. procedure Assign(var d : array [lo..hi:integer] of char;
  36.          var s : array [los..his:integer] of char); external;
  37. {FuncMacro Assign(lo,hi,d,los,his,s) = strcpy(d,s)}
  38.  
  39. procedure AssChar(var d : array [lo..hi:integer] of char;
  40.           c : char); external;
  41. {FuncMacro AssChar(lo,hi,d,c) = sprintf(d, "%c", c)}
  42.  
  43. function Equal(var s1 : array [lo1..hi1:integer] of char;
  44.            var s2 : array [lo2..hi2:integer] of char) : boolean; external;
  45. {FuncMacro Equal(lo1,hi1,s1,lo2,hi2,s2) = !strcmp(s1,s2)}
  46.  
  47. procedure DelString(var s; i, j : integer); external;
  48.  
  49. procedure SubString(var d; var s; i, j : integer); external;
  50.  
  51.