summaryrefslogtreecommitdiff
path: root/distance.go
diff options
context:
space:
mode:
Diffstat (limited to 'distance.go')
-rw-r--r--distance.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/distance.go b/distance.go
index c6d0959..afcf54c 100644
--- a/distance.go
+++ b/distance.go
@@ -1,5 +1,7 @@
package lavenshtein
+// Distance between two strings is the number of deletions, insertions, or
+// substitutions required to transform source string into target string.
func Distance(s, t string) int {
a, b := []rune(s), []rune(t)
u, v := vectors(len(b))