OK, as promised here it is.

http://www.bradwood.com/string_compare/

This is a very crude example, and I'm sure the code can be improved
upon, but feel free to use it if you think it will help you.  

Also, I should clarify...  Below I stated that it didn't perform to well
when doing thousands of long string compares.  That is only half true.
It is slower in CF7, but when I ran it on CF8 it KICKED BUTT.  I'm
talking, a 3 minute page load reduced down to 13 seconds on a SLOWER
server.  Go CF8!

~Brad

-----Original Message-----
From: Brad Wood [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2008 9:50 AM
To: CF-Talk
Subject: RE: Comparing 2 different chunks of text

Hold on-- you had this conversation too early for me to get to work and
reply.  :)

I have a function I wrote a while back to do this.  It is a variant of
the LCS or Longest Common String method.  I found a version online in C
called SIFT3 or something and changed it to cfscript.  It doesn't
perform the best on long strings when you have thousands of them to
compare, but at least it could give you something to start with.  Give
me a minute to post the code somewhere...

~Brad

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306168
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to