(******************************************************************************
*                                STRS11  .DEF                                 *
*                              ABO Software Dep.                              *
* Purpose : To provide some simple commonly used string types and constants.  *
*                                                                             *
*   Notes :                                                                   *
*                                                                             *
*         Version Date : 12/6/92                                              *
******************************************************************************)
DEFINITION MODULE STRS11;

FROM Str IMPORT CHARSET;
FROM ASCII IMPORT ht,lf,cr,eof;

CONST
	NULL_Str  ='';  (*null string.*)
	Printable = CHARSET{' '..'~'};
	Space     = CHARSET{" ",ht,eof};
	NewLine   = CHARSET{cr,lf,eof};
	Separator = Space + NewLine;
	
(* string types: general purpose string types.*)

TYPE
  Str2         =ARRAY[0..1] OF CHAR;
  Str3         =ARRAY[0..2] OF CHAR;
  Str4         =ARRAY[0..3] OF CHAR;
  Str5         =ARRAY[0..4] OF CHAR;
  Str6         =ARRAY[0..5] OF CHAR;
  Str7         =ARRAY[0..6] OF CHAR;
  Str8         =ARRAY[0..7] OF CHAR;
  Str9         =ARRAY[0..8] OF CHAR;
  Str10        =ARRAY[0..9] OF CHAR;
  Str12        =ARRAY[0..11] OF CHAR;
  Str15        =ARRAY[0..14] OF CHAR;
  Str16        =ARRAY[0..15] OF CHAR;
  Str20        =ARRAY[0..19] OF CHAR;
  Str25        =ARRAY[0..24] OF CHAR;
  Str30        =ARRAY[0..29] OF CHAR;
  Str32        =ARRAY[0..31] OF CHAR;
  Str40        =ARRAY[0..39] OF CHAR;
  Str50        =ARRAY[0..49] OF CHAR;
  Str60        =ARRAY[0..59] OF CHAR;
  Str64        =ARRAY[0..63] OF CHAR;
  Str80        =ARRAY[0..79] OF CHAR;
  Str256       =ARRAY[0..255] OF CHAR;

(* routines to strip characters in a set from a string*)
PROCEDURE Strip_trailing(
	VAR inp_str  :ARRAY OF CHAR;
	t:CHARSET);
PROCEDURE Strip_leading(
	VAR inp_str  :ARRAY OF CHAR;
	t:CHARSET);
PROCEDURE Strip(
	VAR inp_str  :ARRAY OF CHAR;
	t:CHARSET);
PROCEDURE ItemPos(
	s:ARRAY OF CHAR;
	t:CHARSET;
	n:CARDINAL):CARDINAL;
PROCEDURE NextItem(
	VAR r:ARRAY OF CHAR;
	s:ARRAY OF CHAR;
	t:CHARSET;
	p:CARDINAL);

END STRS11.