Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Does this answer your question? diff within a line Commented Nov 16, 2021 at 10:33
  • @StephenKitt if git diff has this functionality then it is better to provide a straitghtforward solution. Commented Nov 16, 2021 at 10:52
  • Please edit your question and show us the kind of output you are expecting. Does this need to be something like "the two strings differ at positions 1 and 7"? Commented Nov 16, 2021 at 10:56
  • @terdon counting positions could be complicated in long strings. A more appropriate output is showing insertions and deletions in the string. Commented Nov 16, 2021 at 10:59