Find length of overlap in strings [closed]
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Improve this question do you know any ready-to-use method to obtain length and also overlap of two strings? However only with R , maybe something from stringr ? I was looking here, unfortunately without succes. str1 <- 'ABCDE' str2 <- 'CDEFG' str_overlap(str1, str2) 'CDE' str_overlap