Skip to main content
CrystalDocs
Search documentation
Search
Browse Docs
CrystalShards
About
class
Similar::Utils::TextDiffRemapper(T)
Inherits
Reference
<
Object
Remaps diff ops to slices of the original source strings.
Constructors
from_text_diff
(diff :
Similar::TextDiff
(
T
), old :
T
, new :
T
) : self
Source
new
(old_slices :
Array
(
T
), new_slices :
Array
(
T
), old :
T
, new :
T
)
Source
Instance methods
iter_slices
(op :
DiffOp
) :
Array
(
Tuple
(
ChangeTag
,
T
))
Source
slice_new
(range :
Range
(
Int32
,
Int32
)) :
T
|
Nil
Source
slice_old
(range :
Range
(
Int32
,
Int32
)) :
T
|
Nil
Source