DEFINITION MODULE StringLib0;
(* F. Paquet 17-Apr-86 / C. Pfister 27-Dec-86
   - this module is not Macintosh-specific *)

TYPE
  Result = ( LessThan, EqualTo, GreaterThan);

  PROCEDURE Length(s: ARRAY OF CHAR): INTEGER;

  PROCEDURE Equal (s1, s2: ARRAY OF CHAR): BOOLEAN;
  
  PROCEDURE Compare (s1, s2: ARRAY OF CHAR): Result;
  
  PROCEDURE Occurs(s, pat: ARRAY OF CHAR): BOOLEAN;
   (* return 'pat occurs in s' *)

  PROCEDURE Copy(    src:  ARRAY OF CHAR;
                 VAR dest: ARRAY OF CHAR);                 (* OUT *)
   (* copy src string to dest string *)

  PROCEDURE Concat(VAR dest: ARRAY OF CHAR;                (* INOUT *)
                       pat:  ARRAY OF CHAR);
   (* append pat string to dest string *)

  PROCEDURE Insert(VAR s:   ARRAY OF CHAR;                 (* INOUT *)
                       pat: ARRAY OF CHAR;
                       i:   INTEGER); 
   (* insert pat in s at position i *)

  PROCEDURE Delete(VAR s: ARRAY OF CHAR;                   (* INOUT *)
                       i,
                       l: INTEGER); 
   (* delete s from position i to l *)


END StringLib0.
