14 #ifndef T3_WIDGET_FINDCONTEXT_H
15 #define T3_WIDGET_FINDCONTEXT_H
20 #include <t3widget/widget_api.h>
21 #include <t3widget/stringmatcher.h>
22 #include <t3widget/util.h>
37 static void call_pcre_free(pcre *);
43 cleanup_ptr<string_matcher_t>::t matcher;
47 cleanup_func_ptr<pcre, call_pcre_free>::t regex;
55 cleanup_ptr<std::string>::t replacement;
58 cleanup_free_ptr<char>::t folded;
63 static int adjust_position(
const std::string *str,
int pos,
int adjust);
69 bool check_boundaries(
const std::string *str,
int match_start,
int match_end);
78 finder_t(
const std::string *needle,
int flags,
const std::string *replacement = NULL);
92 void set_context(
const std::string *needle,
int flags,
const std::string *replacement = NULL);
94 bool match(
const std::string *haystack,
find_result_t *result,
bool reverse);
101 std::string *get_replacement(
const std::string *haystack);