diff options
Diffstat (limited to 'subseq/strings.go')
-rw-r--r-- | subseq/strings.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/subseq/strings.go b/subseq/strings.go new file mode 100644 index 0000000..6be73e9 --- /dev/null +++ b/subseq/strings.go @@ -0,0 +1,11 @@ +package subseq + +// MaxSubstring возвращаает максимальную общую подстроку +func MaxSubstring(s1, s2 string) string { + return string(MaxSubset([]rune(s1), []rune(s2))) +} + +// MaxSubsequence возвращает максимальную общую подпоследовательность символов +func MaxSubsequence(s1, s2 string) string { + return string(MaxSubsetSequence([]rune(s1), []rune(s2))) +} |