MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / find_next

Method find_next

test/MockEditorInterface.cpp:623–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

621}
622
623TextPosition MockEditorInterface::find_next(TextPosition from_position, const char *needle) {
624 auto doc = active_document();
625 if (!doc)
626 return -1;
627
628 auto pos = find_case_insensitive(std::string_view(doc->cur.data).substr(from_position), needle);
629 if (pos == std::string::npos)
630 return -1;
631
632 return static_cast<TextPosition>(pos) + from_position;
633}
634
635void MockEditorInterface::replace_text(TextPosition from, TextPosition to, std::string_view replacement) {
636 auto doc = active_document();

Callers

nothing calls this directly

Calls 2

find_case_insensitiveFunction · 0.85
substrMethod · 0.80

Tested by

no test coverage detected