公里数
Javascript 中的字符串搜索算法。
安装
npm install kmp
bower install kmp
用法
var kmp = require ( 'kmp' ) ;
console . log ( kmp ( 'she sells seashells by the seashore' , 'shell' ) ) ; // 13
console . log ( kmp ( 'she sells seashells by the seashore' , 'seaweed' ) ) ; // -1
测试
npm test
执照
麻省理工学院
评论0
最新资源