Robert Klemme
2/12/2009 1:14:00 PM
2009/2/12 Talib Hussain <talibhn@gmail.com>:
> I have a requirement of comparing string and getting the difference out
>
> For Example :
>
> strOne = "Hello, this is a test"
> strTwo = "Hello, this is a test forum"
>
> This should result that word "forum" is extra.
>
> Any thoughts?
IMHO your question is by far not specific enough. What kind of output
do you expect exactly? Do you want all _words_ reported that are
missing or extra? Do you have to have _substrings_ reported which are
missing or extra? Do you need _positional information_ with that? If
so, which (word position, character position)? Do you need human
readable output or do you want to automatically process it? etc.
Cheers
robert
--
remember.guy do |as, often| as.you_can - without end