Copy link to clipboard
Copied
Hi there,
I have been trying to find a coldfusion function that will help, I have tried comparing two strings but the results of -1 1 or 0 aren't very useful.
I need to compare a database field with a form field and highlight all the differences in the form field in red.
Thanks
Katie
Copy link to clipboard
Copied
This is a non-trivial process. Rather than doing a compare, you really are wanting to do a diff. CF doesn't do this out of the box, but you might want to have a sniff around on Google to see if anyone has implemented anything for CF.
Some reading:
http://en.wikipedia.org/wiki/Diff#Algorithm
--
Adam