17 BufferSearch(std::string_view searchTerm, std::string_view terminationChars, std::string_view giveUpTerm,
CallbackType &&callback);
19 void operator()(
const std::string_view::value_type *buffer, std::size_t bufferSize);
20 template <std::
size_t bufferCapacity>
21 void operator()(std::shared_ptr<std::array<std::string_view::value_type, bufferCapacity>> buffer, std::size_t bufferSize);
22 const std::string_view::value_type *
process(std::string_view buffer);
23 const std::string_view::value_type *
process(
const std::string_view::value_type *buffer, std::size_t bufferSize);
26 const std::string &
result()
const;
29 const std::string_view m_searchTerm;
30 const std::string_view m_terminationChars;
31 const std::string_view m_terminationTerm;
32 const std::string_view m_giveUpTerm;
34 std::string_view::const_iterator m_searchTermIterator;
35 std::string_view::const_iterator m_giveUpTermIterator;
36 std::string_view::const_iterator m_terminationTermIterator;
45 std::string_view searchTerm, std::string_view terminationChars, std::string_view giveUpTerm,
CallbackType &&callback)
46 : m_searchTerm(searchTerm)
47 , m_terminationChars(terminationChars)
48 , m_giveUpTerm(giveUpTerm)
49 , m_callback(
std::move(callback))
50 , m_searchTermIterator(m_searchTerm.begin())
51 , m_giveUpTermIterator(m_giveUpTerm.begin())
52 , m_terminationTermIterator(m_terminationTerm.begin())
BufferSearch(std::string_view searchTerm, std::string_view terminationChars, std::string_view giveUpTerm, CallbackType &&callback)
Constructs a new BufferSearch.