[comp.lang.pascal] Turbo pas unit available

MATHRICH@umcvmb.missouri.edu (Rich Winkel UMC Math Department) (03/19/89)

I recently completed an update of my STRINGS.TPU for Turbo Pascal 5.0.  This
tpu contains 27 string oriented functions paralleling the string functions
available in IBM's mainframe language Rexx.  All functions except 2 are
implemented in assembler and make extensive use of the 80x86's string opcodes
(REPxx SCASB, CMPSB, MOVSB).  The routines are highly optimized, FAST and
compact.  The demo version of the tpu is freeware, and includes:

left(str,width,pad), right(str,width,pad), center(str,width,pad)
   Positions/truncates STR in a field of width WIDTH, padding out with PAD if
   needed.
lastpos(findstr,instr,start), firstpos(findstr,instr,start)
   Last and first position of FINDSTR in INSTR, subject to START.
words(str) Number of words in STR.
subword(str,n,count), werd(str,n)
   Extract COUNT (or 1) words from STR, starting at word N.
delword(str,n,count)
   Delete COUNT words from STR, starting at word N.
word2pos(str,wrd), pos2word(str,pos)
   Convert between word number and character position.
justify(str,len)
   Distribute blanks between words in STR to left and right justify.
space(str,spc) Adjust number of spaces between each word in STR.
overlay(new,str,pos,pad) Overlays NEW onto STR starting at position POS.
strip(str,opt,ch) Strips all leading and/or trailing CH characters from STR.
copies(str,count) Returns STR concatenated with itself COUNT times.
xrange(c1,c2) Returns string consisting of all characters from C1 to C2
   inclusive.
translate(str,intable,outable)
   Translates characters in STR via F(intable[i]) = outable[i].
d2x(d) x2d(x) Converts between hex string and WORD type.
chgstr(str,old,new,n,count) Change COUNT occurrances in STR of OLD to NEW,
   starting at N'th occurrance.
compare(str1,str2) Character position where STR1 differs from STR2.
uppercase(str), lowercase(str) Case conversion.
abbrev(str,abbr,len) Boolean: checks if ABBR is valid abbreviation for STR.
reverse(str) Returns contents of STR in reverse order.
verify(str,reference,opt,start) Check for valid or invalid chars in STR.

The tpu is available from me in arc or uuencoded arc format.

Rich Winkel
MATHRICH@UMCVMB.MISSOURI.EDU or MATHRICH@UMCVMB