www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Has someone ported Python's difflib already?

reply Michael Butscher <mbutscher gmx.de> writes:

just to avoid doing it once more:

Has someone already ported Python's difflib to D, especially the 
SequenceMatcher class. The comments state that:
"The basic algorithm predates, and is a little fancier than, an 
algorithm published in the late 1980's by Ratcliff and Obershelp under 
the hyperbolic name 'gestalt pattern matching'."

Or, maybe, is there already another D class around which can compare 
two files or byte arrays (or, better, arbitrary arrays) and create a 
list of commands (delete, insert, modify) to transform one array into 
the other?

Oct 16 2006
parent Walter Bright <newshound digitalmars.com> writes:
Not that I know of. I think it'd be cool to get it for D.
Oct 16 2006