From: Robert Klemme Date: 2010-12-15T16:40:18+09:00 Subject: Re: do your bit for my mental health - how to find the difference between two strings? On 15.12.2010 07:15, thunk wrote: > If he adopted the nearness tester for a quick true/false for equality > he would get one of two results: > > 1. The test finds a difference, and this case he could drill down on > the physical difference. > > 2. The test finds no difference, then he could use it as a work- > around to get on with app while the powers that be do what the powers > that be do sometime in the future. As Brian has correctly pointed out there are more ways that String instances can differ than just character content. And Levenstein Distance is zero for Strings with identical content (which the OP indicated). So there is no additional information to be gained from calculating this measure. > George George, my 0.02 EUR on this: admitting to have made a mistake and even apologizing does not hurt. It has happened to me, it has happened to others around here as well - it happens all the time to everybody. On the contrary, trying to defend your initial posting which is obviously off the mark is unlikely to earn you merits. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/