Skip to main content

diff_words

Function diff_words 

Source
pub fn diff_words(old: &str, new: &str) -> (Vec<WordSegment>, Vec<WordSegment>)
Expand description

Compute word-level diff segments between two strings.

Returns (old_segments, new_segments) where each segment indicates whether it’s equal or changed relative to the other side.