A TextSub.T
represents a subsequence of another text.
INTERFACETextSub ; TYPE TT <: Public; Public = TEXT OBJECT base : TEXT; start : CARDINAL; len : CARDINAL; END; PROCEDURE New (t: TEXT; start, length: CARDINAL): TEXT;
Return a sub-sequence oft
: empty ifstart >= Length(t)
orlength = 0
; otherwise the subsequence ranging fromstart
to the minimum ofstart+length-1
andLength(t)-1
.
END TextSub.