Download my-compare-xfcn.hqx (21,376 KB)
From: parnassien@netins.net (Tracy L. Hinshaw)
Subject: MyCompare XFCN. HyperCard & Supercard
MyCompare(TargetString,TestString). XFCN for HyperCard® & SuperCard®
Copyright © 1996. Tracy L. Hinshaw, Parnassien Language Software.
MyCompare is an XFCN that "compares" two strings and returns an
"analyzed" or "marked" version showing discrepancies between the two.
MyCompare uses three symbols in its return value:
"*" = Indicates a non-matching character in the
test string.
"-" = Indicates a missing character in the
test string.
"+" = Indicates an extra character in the
test string.
EXAMPLE:
TARGET STRING: "Elvis cannot be dead."
TEST STRING: "Elvira can be dad."
RETURN VALUE: "Elvi*+ can--- be d***-."
At this point in its development, MyCompare is fairly strict. It is
case-sensitive and requires that all punctuation, diacriticals and spacing
be exact. If you have a stack or project in which you would rather allow
some latitude (capitalization, punctuation, sloppy typing etc.), simply
convert both strings to upper case and strip out "extraneous" characters
(spaces, punctuation marks...) before comparing. You'll find that with a
little "pre-processing", MyCompare can actually be quite flexible.
MyCompare only recognizes the first 255 characters of input strings at
this point. The next version will recognize up to 30000 chars.
MyCompare is provided as "AnyWare." That is, if you use it, please let me
know by sending "Anything" you have cluttering up your desktop: a poem
you've written, a picture of your dog, a program you've developed, money, a
postcard from your hometown etc. - just something to let me know that my
programs are being used and that they're not gathering cyberdust in a
virtual warehouse somewhere.
Any commercial use of this xfcn must be licensed and approved by the author.
Send treasures to:
Tracy L. Hinshaw
Parnassien Language Software
P.O. Box 142
Kellogg, IA 50135
parnassien@netins.net
http://www.netins.net/showcase/fornlngz/card/parnassien_externals.html