Let's say we have variable/string 'alex' 'luth' 'tex' , 'mav'

is there a command in stata which lets us know that 'alex' and 'tex' have overlapping characters/letters and 'tex' and 'luth' have overlapping characters, but 'mav' and 'tex' do not overlap?

If not, what are some solutions?