Introduction - If you have any usage issues, please Google them yourself
Improved KMP algorithm (data structure), nextval values can be output to determine whether the substring matches with the main string, then you can match the output of where to start matching