The std::search algorithm returns the first instance of a sub-sequence.
The C++17 variant supports both parallel execution and custom searchers. Custom searchers offer better average complexity (up to linear).
Compiler Explorer link: https://compiler-explorer.com/z/z1K7Wfz67