You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -43,19 +43,19 @@ More documentation on [pcre.org](https://www.pcre.org/current/doc/html/pcre2synt
43
43
This is approximated API specification from a user perspective (omitting `constexpr` and `noexcept` which are everywhere, and using C++20 syntax even the API is C++17 compatible):
44
44
```c++
45
45
// look if whole input matches the regex:
46
-
template <fixed_string regex> autoctre::match(auto Range &&) -> regex_result;
47
-
template <fixed_string regex> auto ctre::match(auto First &&, auto Last &&) -> regex_result;
46
+
template <fixed_string regex> autoctre::match(auto Range &&) -> regex_results;
47
+
template <fixed_string regex> auto ctre::match(auto First &&, auto Last &&) -> regex_results;
48
48
49
49
// look if input contains match somewhere inside of itself:
50
-
template <fixed_string regex> auto ctre::search(auto Range &&) -> regex_result;
51
-
template <fixed_string regex> auto ctre::search(auto First &&, auto Last &&) -> regex_result;
50
+
template <fixed_string regex> auto ctre::search(auto Range &&) -> regex_results;
51
+
template <fixed_string regex> auto ctre::search(auto First &&, auto Last &&) -> regex_results;
52
52
53
53
// check if input starts with match (but doesn't need to match everything):
54
-
template <fixed_string regex> auto ctre::starts_with(auto Range &&) -> regex_result;
55
-
template <fixed_string regex> auto ctre::starts_with(auto First &&, auto Last &&) -> regex_result;
54
+
template <fixed_string regex> auto ctre::starts_with(auto Range &&) -> regex_results;
55
+
template <fixed_string regex> auto ctre::starts_with(auto First &&, auto Last &&) -> regex_results;
56
56
57
57
// result type is deconstructible into a structured bindings
58
-
template <...> struct regex_result {
58
+
template <...> struct regex_results {
59
59
operator bool() const; // if it's a match
60
60
auto to_view() const -> std::string_view; // also view()
61
61
auto to_string() const -> std::string; // also str()
0 commit comments