// KMP 算法
/*
1、传统查找字符串方法
1.1
abcdefgheijgadsfas
hello
1.2
abcdefgheijgadsfas
hello
会进行字符比较17次
1.3
12345678910
abcdefhel l iasfasfasdf
hel lo
1.3
11
12345678910
abcdefhel l iasfasfasdf
hel lo
1.3
1112
12345678 910
abcdefhe l l iasfasfasdf
hel lo
12345678910
abcdefhel l iasfasfasdf
hel lo
hell*****
hello
hell
hell
*/
function getOffsetNum(pattern) {
// hell
// hell
return 4;
hehe
hehe
return 2;
}