Before marking this as duplicate, please read the details here.
Example 1:
String A: The seven habits of highly effective people.
String B: "This is a sample text. There is only one product in it. It is a book. The book is The seven habits of highly effective people."
Example 2:
String A: The seven habits of highly effective people.
String B: "This is a sample text. There is only one product in it. It is a book. The book is The seven habits of highly effective peopl."
Now solving the above examples with a code like
B.Contains(A)
will give the correct results. However the same code will return "false" as output in Example 2.
How do I resolve this problem?
There is an "e" missing in example 2 and I am aware about it and that's the problem. How do I compare one string with another where string A is nearly identical with a "part of string B"?