Number of Strings That Appear as Substrings in Word

给一个parttern数组和一个string, 问有多少这个string的substring在pattern数组里.