A simple way to do this would be to split the chunk of text on a space, into
an array or list. Then loop over that list and compare bit of the string
individually. At that point you'd be able to tell where the changes are, if
there are any.

-----Original Message-----
From: Abigail Coker [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2008 7:34 AM
To: CF-Talk
Subject: Re: Comparing 2 different chunks of text

>// just use equality comparison
><cfif textChunk1 IS textChunk2>
>  The two chucks seem from the same stock.
><cfelse>
>  You're nuts.  Just kidding :)
></cfif>

But using equality will only tell you if they're equal or not e.g. the
compare function will only return a -1,0 or 1.

I was hoping that there is a function or a UDF out there that will compare
two different strings and highlights the different words or character in the
second string...

hope it makes sense... 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:306143
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to