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. |
These two strings cannot overlap:
| In[1]:= |
| Out[1]= |
These two strings can only overlap in one way:
| In[2]:= |
| Out[2]= |
These strings can overlap in either order:
| In[3]:= |
| Out[3]= |
These strings can overlap in several ways:
| In[4]:= |
| Out[4]= |
This string cannot overlap with itself:
| In[5]:= |
| Out[5]= |
This string can overlap with itself in multiple ways:
| In[6]:= |
| Out[6]= |
Constant strings have overlaps that vary in length:
| In[7]:= |
| Out[7]= |
| In[8]:= |
| Out[8]= |
This work is licensed under a Creative Commons Attribution 4.0 International License