开发者

how to compare two string and highlight changes? [duplicate]

This question already has answers here: How to display word differences using c#? (4 answers) Closed 2 years ago. 开发者_如何转开发

I have two strings.

stringV1 = "123456";
stringV2 = "102300456";

First I need to compare them.

If stringV2 has some changes, this new text should be highlighted like this:

"1'0'23'00'456"


this has been discussed here already sometimes...

How to highlight the differences between subsequent lines in a file?

How to display word differences using c#?

...


Use Diff algorithm for string comparision.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜