November 16th, 2011, 03:42 AM
Advance String comparison
i got stuck while comparing 2 strings. The requirement is as below:
str1 = "My name is Arvind"
str2 = "His name is Goel"
now i would like to print something like this : (Its comparing what has been changed in these strings)
"My His name is Arvind Goel"
i have used [I] and [B] here to show deleted and added characters respectively. i have used this here just for differentiating added and deleted characters. actual scenerio will be something different.
Output should have added characters in BOLD and deleted characters in Italics and rest characters as simple.
i really could not start with that how to proceed here.
Any inputs in this regard will be helpful.
Thanks for the comments.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.