0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

link > algorithm > string difference > Longest common subsequence (LCS) problem > Delphi実装

Last updated at Posted at 2017-08-12
動作環境
C++ Builder XE4

2つのファイルの差分を知りたい時にどうするか。

2つの文字列の差分の取り方の実装例(Delphi)は以下で見つけた。
https://www.codeproject.com/Articles/508682/StringpluscomparisonplusinplusDelphi

Have you ever wondered how utilities like Beyond Compare or DIFF are comparing files? They do it (I guess) by solving the longest common subsequence (LCS) problem.

実行例では追加された部分が青色で、削除された部分は赤色で示されている。

中の処理は再帰処理をしているようだ。

2つのファイル差分取得に使えるかどうか。

自前実装よりも外部ツールで差分を見る方が見やすいかもしれない。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?