View source code
Display the source code in std/algorithm/comparison.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Enum std.algorithm.comparison.EditOp
Encodes
edit operations necessary to transform one sequence into
another. Given sequences s
(source) and t
(target), a
sequence of
encodes the steps that need to be taken to
convert EditOp
s
into t
. For example, if s = "cat"
and "cars"
, the minimal sequence that transforms s
into t
is:
skip two characters, replace 't' with 'r', and insert
an 's'. Working
with edit operations is useful in applications such as spell-checkers
(to find the closest word to a given misspelled word), approximate
searches, diff-style programs that compute the difference between
files, efficient encoding of patches, DNA sequence analysis, and
plagiarism detection.
The enum base type is
.
char
Enum members
Name | Description |
---|---|
insert
|
Insert current item from the source into the target. |
none
|
Current items are equal ; no editing is necessary.
|
remove
|
Remove current item from the target. |
substitute
|
Substitute current item in target with current item in source. |