That kinda depends on what "difference between two strings" actually means.
If you have two strings "
" and "
" is the difference a character by character comparison:
"b => f, c=> b, d => c, e => d
Or a more advance "inserted, deleted list":
What if the strings are different lengths? Does that make a difference?
Comparing strings to find actual differences can be pretty complicated, for example: Levenshtein distance - Wikipedia
There is a list of different string metrics here: String metric - Wikipedia
I'd say that the first thing you need to do is work out exactly what you mean by "difference", and then consider implementation after that!