String comparing

Is there any good algorithm for comparing two strings? For instance,

- 'hello' compared to 'hello' would return 1.

- 'hello' compared to 'hallo' would return something like 0.95.

- 'hello' compared to 'It seems like the wind's kicking up' (Jay Leno's on - I quoted him) would return 0.05.

You get the picture, right? They've got it in M$ Office, I believe.

Hope you've got a solution,

Nille

[453 byte] By [nille40a] at [2007-9-28 3:50:24]
# 1
"hallo".compareTo("hello")
soren_baka at 2007-7-7 23:22:38 > top of Java-index,Other Topics,Algorithms...
# 2
Search Google for "string similarity algorithm", there's a lot of relevant-looking links there.
DrClapa at 2007-7-7 23:22:38 > top of Java-index,Other Topics,Algorithms...
# 3
Do a search on Fuzzy logic as well...
macrules2a at 2007-7-7 23:22:38 > top of Java-index,Other Topics,Algorithms...