Answer the question
In order to leave comments, you need to log in
SWIFT Algorithm for finding differences in texts?
I want to write a software where you insert 2 texts and it looks for where they are cast and highlights them with color. Type of search for the adjustments made.
So, is there a ready-made algorithm for finding differences? So far, it occurred to me to compare character-by-character from the moment of finding 1 matching character to the moment when the next-next-...-next character suddenly does not match in the sequence.
But the algorithm doesn't seem to be efficient or optimal, and I don't want to make a bicycle - is there an algorithm-library-function for this in Swift?
Answer the question
In order to leave comments, you need to log in
Library from Google Google diff-match-patch.
You are interested in diff.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question