DEFINITION MODULE Strings;

(* (C) Copyright 1987 Fitted Software Tools. All rights reserved. *)

(*
    A strings is an ARRAY OF CHAR.
    If the string does not completely fill the array, it is terminated
    by a 0C.
*)

PROCEDURE CompareStr( s1, s2 :ARRAY OF CHAR ) :INTEGER;
(*
    Returns:
        0 if s1 = s2
       -1 if s1 < s2
       +1 if s1 > s2
*)

PROCEDURE Assign( VAR source, dest :ARRAY OF CHAR );
(*
    copies source to dest
*)

PROCEDURE Length( s :ARRAY OF CHAR ) :CARDINAL;
(*
    returns the length of s
*)

PROCEDURE Concat( s1, s2 :ARRAY OF CHAR; VAR result :ARRAY OF CHAR );
(*
    Concatenates s2 to s1 and puts it in result
*)

PROCEDURE Pos( subs, s :ARRAY OF CHAR ) :CARDINAL;
(*
    Returns:
        index of first occurrence of subs in s or
        > HIGH(s) if no match is found
*)

END Strings.