比较2个字符串并输出差异 [英] Comparing 2 string and outputting the differance

查看:237
本文介绍了比较2个字符串并输出差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要编写一个比较2个字符串并输出差异的函数,例如你在一个文本框中有一个更新HTML文件,以前的HTML文件在另一个文本框中,我想比较它们,并将
两个文件之间的差异。

I need to write a function that will compare 2 string and output the difference, for example you have an update HTML file in one text box and a previous HTML file in the other text box and i want to compare them both and out put the difference between the two files.

我已准备就绪,我只需要实现将进行比较的代码。

i have everything ready i just need to implement the code which will out put the comparison.

谢谢,

Joe。

推荐答案


我需要编写一个比较2个字符串并输出差异的函数,例如你在一个文本框中有一个更新HTML文件,在另一个文本框中有一个以前的HTML文件,我想比较它们两者之间的区别
两个文件。

i已经准备就绪了我只需要实现将比较的代码。

I need to write a function that will compare 2 string and output the difference, for example you have an update HTML file in one text box and a previous HTML file in the other text box and i want to compare them both and out put the difference between the two files.
i have everything ready i just need to implement the code which will out put the comparison.

其中存在困难:)

我建议您使用第三方派对差异工具,例如Beyond Compare。

I'd suggest that you get a 3'rd party diff tool such as Beyond Compare.

Dave


这篇关于比较2个字符串并输出差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆