简体   繁体   中英

API For KMP or Boyer-Moore string pattern matching in C++ / STL?

Wondering, if I want to replace strstr with a better string matching algorithm, like KMP or Boyer Moore, is there one in C++ or do we have to write on our own?

Wondering, what is the practical string matching function that everyone uses other than strstr?

This is with respect to C++/STL under Unix/Linux platform.

我没有看到很多使用特定于C ++的特性,但是有很多KMP的实现和(特别是)Boyer-Moore的变种(例如, Boyer-Moore-Horspool )可以很容易地从C ++中使用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM