mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Add convenience API for searching std::string
This commit is contained in:
@@ -124,6 +124,11 @@ namespace regexp
|
||||
return match_t();
|
||||
}
|
||||
|
||||
match_t search (pattern_t const& ptrn, std::string const& str)
|
||||
{
|
||||
return search(ptrn, str.data(), str.data() + str.size());
|
||||
}
|
||||
|
||||
// =====================
|
||||
// = Syntax validation =
|
||||
// =====================
|
||||
|
||||
@@ -76,6 +76,7 @@ namespace regexp
|
||||
|
||||
PUBLIC std::string validate (std::string const& ptrn);
|
||||
PUBLIC match_t search (pattern_t const& ptrn, char const* first, char const* last, char const* from = NULL, char const* to = NULL, OnigOptionType options = ONIG_OPTION_NONE);
|
||||
PUBLIC match_t search (pattern_t const& ptrn, std::string const& str);
|
||||
|
||||
} /* regexp */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user