aboutsummaryrefslogtreecommitdiff
path: root/levenshtein/strings.go
diff options
context:
space:
mode:
authorAlexander Kiryukhin <a.kiryukhin@mail.ru>2022-05-01 21:50:12 +0300
committerAlexander Kiryukhin <a.kiryukhin@mail.ru>2022-05-01 21:50:12 +0300
commit9fcf8e29214210612d545bed50d7f889800ac639 (patch)
tree3a99d2cd37fb8158d49abc1de6298758d205c9dd /levenshtein/strings.go
Initial
Diffstat (limited to 'levenshtein/strings.go')
-rw-r--r--levenshtein/strings.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/levenshtein/strings.go b/levenshtein/strings.go
new file mode 100644
index 0000000..a6257d1
--- /dev/null
+++ b/levenshtein/strings.go
@@ -0,0 +1,11 @@
+package levenshtein
+
+// String возвращает последовательность правок для превращения строки s1 в строку s2
+func String(s1, s2 string) []Edit {
+ return Levenshtein([]rune(s1), []rune(s2), nil)
+}
+
+// Strings возвращает последовательность правок для превращения слайса строк s1 в слайс строк s2
+func Strings(s1, s2 []string) []Edit {
+ return Levenshtein(s1, s2, nil)
+}