\begin{xple}
\textbf{interface} Lines
(* interface for a modul to separate lines and words of a string *)
\textbf{import} iter
\textbf{export}
        error \textbf{:Exception end}

        T $<$:\textbf{Ok}

        e :T
        
        create(str :String  dls :String  mFlg :Bool) :T
        (* convert string to lines object with word delimiters of `dls'
           mFlg = true: a stream of delimiters counts once,
           mFlg = false: each delimiter in a delimiter stream counts *)
        
        toString(:T) :String
        (* convert lines object to string *)
        
        create2(str :String  lneDl :String  wrdDl :String) :T
        (* convert string to lines object with word delimiter of `wrdDl'
           and lines delimiters of `lneDl' *)

        words(:T) :Int
        (* count words *)

        get(:T  idx :Int) :String
        (* get word number `idx' *)
        
        get2(:T  lneIdx :Int  wrdIdx :Int) :String
        (* get word number `wrdIdx' of line `lneIdx' *)
        
        set(:T  idx :Int  str :String) :\textbf{Ok}
        (* set word number `idx' *)

        set2(:T  lneIdx :Int  wrdIdx :Int  str :String) :\textbf{Ok}
        (* set word number `wrdIdx' of line `lneIdx' *)

        getDL(:T  idx :Int) :String
        (* get delimiter word number `idx' *)

        getDL2(:T  lneIdx :Int  wrdIdx :Int) :String
        (* get delimiter word number `wrdIdx' of line `lneIdx' *)

        setDL(:T  idx :Int  str :String) :\textbf{Ok}
        (* set delimiter word number `idx' *)

        setDL2(:T  lneIdx :Int  wrdIdx :Int  str :String) :\textbf{Ok}
        (* set delimiter word number `wrdIdx' of line `lneIdx' *)

        setPreFix(:T  idx :Int  str :String) :\textbf{Ok}
        (* set prefix of word number `idx' *)

        setPreFix2(:T  lneIdx :Int  wrdIdx :Int  str :String) :\textbf{Ok}
        (* set prefix of word number `wrdIdx' of line `lneIdx' *)

        setPostFix(:T  idx :Int  str :String) :\textbf{Ok}
        (* set postfix of word number `idx' *)

        setPostFix2(:T  lneIdx :Int  wrdIdx :Int  str :String) :\textbf{Ok}
        (* set postfix of word number `wrdIdx' of line `lneIdx' *)

        getWrdIdxByColIdx(:T  lneIdx :Int  colIdx :Int) :Int
        (* convert column index `colIdx' to word index at line `lneIdx' *)

\textbf{end};


\end{xple}
%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "quas"
%%% End: 
