Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find substrings that overlap between strings
ResourceFunction["StringOverlaps"][{string1,string2,…}] gives a list of overlaps that exist between any of the stringi. | |
ResourceFunction["StringOverlaps"][string] gives overlaps of string with itself. |
Find the overlap between two strings:
| In[1]:= |
| Out[1]= |
Find the overlaps between two strings in either order:
| In[2]:= |
| Out[2]= |
Find the overlaps of a string with itself:
| In[3]:= |
| Out[3]= |
Find all pairwise overlaps between a list of multiple strings:
| In[4]:= |
| Out[4]= |
A string with distinct prefix and suffix does not have overlaps:
| In[5]:= |
| Out[5]= |
Constant strings have overlaps that vary in length:
| In[6]:= |
| Out[6]= |
Use LongestCommonSequence to find the common sequence between two strings:
| In[7]:= |
| Out[7]= |
StringOverlaps returns the combination of the strings:
| In[8]:= |
| Out[8]= |
This work is licensed under a Creative Commons Attribution 4.0 International License